Java Mail

chandu33
chandu33 used Ask the Experts™
on
Hi Experts,

I am trying my first look @ Java Mail and I keep getting the below exception

avax.mail.SendFailedException: Sending failed;
  nested exception is:
      javax.mail.MessagingException: Could not connect to SMTP host: smtp.mail.yahoo.com, port: 25;
  nested exception is:
      java.net.ConnectException: Connection refused: connect
      at javax.mail.Transport.send0(Transport.java:219)
      at javax.mail.Transport.send(Transport.java:81)


Can some body help me with a simple working example of Java Mail Program..

Thanks
- C
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
You may need to authenticate. See http://java.sun.com/products/javamail/FAQ.html
www.icemail.org


java based client with examples and libs
Commented:
Maybe you are blocked by your local firewall. When you try the command
CMD> telnet smtp.mail.yahoo.com 25

does it work ?? you should see the SMTP server welcome banner.

david

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial