This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes imap javamail help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "imap javamail help" Watch "imap javamail help" New topic
Author

imap javamail help

Jitesh Ranavaya
Greenhorn

Joined: Sep 09, 2004
Posts: 9
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

Joined: Sep 09, 2004
Posts: 9
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;
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: imap javamail help
 
Similar Threads
JavaMail
Java Mail - How to send to Multiple recipients
Mail variables are not being resolved to a type !
Javamail interface error
javamail jsp problem