I am trying to connect to the gmail POP3 mail server using Java Socket connection. But I am getting "java.net.ConnectException: Connection timed out: connect" exception. How to set the timeout property of Socket before actually connecting to the mail server? Thanks in advance. [ October 21, 2008: Message edited by: Omkar Shetkar ]
If you're timing out, it's most likely due to a firewall or connectivity issue -- i.e., something between you and the server is blocking your packets. Check with your local network admins.
This a is a very common problem, if you want to connect to gmail...You have to go to your gmail account and allow pop3 connection. If you don't, you will get this exception. Try this and tell me if it works...
If the above doesn't work, check if you types pop3 as "pop3" not "POP3" in your code. But I think this gives a NoSuchProviderException not a ConnectionTimeOut [ November 03, 2008: Message edited by: Devasia Manuel ]
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
Gift giving made easy with the permaculture playing cards