Details
-
Defect
-
Status: Closed
-
Minor
-
Resolution: Complete
-
2.2 RC2
Description
ImapMailReceiver may wait long for some new messages if IMAP server do not support RECENT flag (gmail, CommuniGate ...):
public void waitForNewMessages() throws MessagingException {
...
if (imapFolder.hasNewMessages())
...
try
...
}
Because imapFolder.hasNewMessages() can return true only if the server supports RECENT flag and the Folder always remain in the open state (see JavaMail 1.4.5 source).
Perhaps you can replace method hasNewMessages() by searchForNewMessages() here if server do not support RECENT.