• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mail program timing out to smtp.gmail.com

 
Jon Camilleri
Ranch Hand
Posts: 664
Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rob Spoor
Sheriff
Pie
Posts: 20661
64
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic