Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

imap javamail help

 
Jitesh Ranavaya
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I decided it would be easier to use IMAP, since I'm only interested in sending emails. My test program is shown below, am pretty sure somethings wrong...I just dont know what. I get the following error:

java.net.ConnectException: Connection timed out: connect

Heres the code:


I'm in desperate need for this to work....somebody please help.
 
Jitesh Ranavaya
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the line:

Store store = s.getStore("imap");

should read...

Store store = s.getStore("pop3");

but now I get these two errors at different times...

javax.servlet.ServletException: [IN-USE] account is locked by another session or for maintenance, try again.

and....

class javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic