It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Java Forum

Sending failed in Java Mail

Sending failed in Java Mail

Postby ha_doshi on Sat Mar 31, 2007 7:35 pm

The following is the exception i m getting in my code. If anyone can help.
Thanks in advance.

C:\>java sendEmail
Exception in thread "main" javax.mail.MessagingException: Connect failed; nested exception is:
java.net.UnknownHostException: smtp.gmail.com
at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:148)
at javax.mail.Service.connect(Service.java:275)
at javax.mail.Service.connect(Service.java:156)
at retrieveEmail.main(retrieveEmail.java:16)
Caused by: java.net.UnknownHostException: smtp.gmail.com
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
at com.sun.mail.pop3.Protocol.<init>(Protocol.java:81)
at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:201)
at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:144)
... 3 more
ha_doshi
 
Posts: 0
Joined: Fri Mar 30, 2007 7:49 pm

Who is online

Users browsing this forum: No registered users and 1 guest