File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "imap javamail help" Watch "imap javamail help" New topic

imap javamail help

Jitesh Ranavaya

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: Connection timed out: connect

Heres the code:

I'm in desperate need for this to work....somebody please help.
Jitesh Ranavaya

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.


class javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
I agree. Here's the link:
subject: imap javamail help
It's not a secret anymore!