File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes IMAP connection failed. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "IMAP connection failed." Watch "IMAP connection failed." New topic
Author

IMAP connection failed.

evelyn ong
Greenhorn

Joined: Aug 03, 2010
Posts: 13
Hi,

I am trying to connect to mail server using IMAP, however sometime i do get the following errors:

javax.mail.MessagingException: * BYE Disconnected for inactivity.

How do i overcome the problem? Is there a way to keep the connection alive?
gx glix
Greenhorn

Joined: Mar 08, 2011
Posts: 2
Hi evelyn, what are you doing that takes so long after opening an imap folder?

I usually open the folder scan messages parse them insert to db and close the session.
You could create a timer task to do getmessagecount every so often but its just a dirty workaround.
why not design your app to open a connection when needed rather than open and wait for activity


GX
 
Consider Paul's rocket mass heater.
 
subject: IMAP connection failed.