aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes Mail program timing out to smtp.gmail.com Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Mail program timing out to smtp.gmail.com" Watch "Mail program timing out to smtp.gmail.com" New topic
Author

Mail program timing out to smtp.gmail.com

Jon Camilleri
Ranch Hand

Joined: Apr 25, 2008
Posts: 660

Is it possible to update this code snippet, in order to reflect the authentication required by Gmail. When I run this program using smtp.gmail.com as an SMTP server, an error is reading java.net.ConnectException



Source Core Java Volume 2 (7th Edition)

Related links
1. Configuring other email clients (Gmail).
2. RFC 2183, updated by RFC 2184, and, RFC 2231.


Jon
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19723
    
  20

Don't manually connect to an SMTP server, but use JavaMail instead. It's designed for this kind of thing, and if you search a bit you'll find plenty of examples about getting JavaMail to connect to Google.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mail program timing out to smtp.gmail.com