aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes unknown host exception error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply locked New topic
Author

unknown host exception error

gayathri murugesan
Ranch Hand

Joined: Dec 21, 2009
Posts: 32
we are retrieving mail from gmail server.we could connect to the gmail server without proxy. As there is a proxy setting in our college we couldn't connect to the gmailserver even after setting the system properties. we could connect to gmail.com from our browser but we couldn't connect from our program.





i am getting the exception as


java.net.UnknownHostException: imap.gmail.com
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:618)
at javax.mail.Service.connect(Service.java:291)
at javax.mail.Service.connect(Service.java:172)
at EmailClient.connect(EmailClient.java:374)
at EmailClient.main(EmailClient.java:476)
by: java.net.UnknownHostException: imap.gmail.com
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(Unknown Source

at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:284)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:201)
at com.sun.mail.iap.Protocol.<init>(Protocol.java:109)
at com.sun.mail.imap.protocol.IMAPProtocol.<init>(IMAPProtocol.java:104)

at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:585)
... 4 more

please help!

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9990
    
    7

Please do not post the same question multiple times.
Original here http://www.coderanch.com/t/482092/Other-JSE-JEE-APIs/java/error-retrieving-mail-through-proxy


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: unknown host exception error
 
Similar Threads
Read emails from Microsoft Outlook Using Java Mail
error in retrieving mail through a proxy.
Problem using Java Mail API
send email using gmail account
Unknown SMTP host for gmail