gmail - FolderClosedException: * BYE JavaMail Exception: java.io.IOException: Connection dropped by server? -


i'm using javamail 1.5.5 , want listen new messages in gmail mailbox.

i have implementation of messagecountlistener, on messagesadded method, @ end do:

try {         // process new messages         idlemanager.watch(ifo); // keep watching new messages     } catch (messagingexception mex) {         logger.error(".....", mex);     } 

i'm not sure understand because exception...

i believe i'm doing said here https://javamail.java.net/nonav/docs/api/com/sun/mail/imap/idlemanager.html#watch-javax.mail.folder-

follows mail debug log, consider after exception, no new messages arrived anymore listner.

debug imap: idlemanager selected 1 channels debug imap: idlemanager selected folder: imaps://xxxxxxxxxx@imap.gmail.com:993/inbox * 1026 fetch (uid 4284 flags (\answered \seen)) debug imap: idlemanager continue watching folder imaps://xxxxxxx@imap.gmail.com:993/inbox debug imap: idlemanager adding imaps://xxxxxxxxx@imap.gmail.com:993/inbox selector debug imap: idlemanager waiting... debug imap: idlemanager selected 1 channels debug imap: idlemanager selected folder: imaps://xxxxxxxxxxx@imap.gmail.com:993/inbox debug imap: handleidle: set running debug imap: idlemanager got exception folder: imaps://prismatest@imap.gmail.com:993/inbox, throw:  javax.mail.folderclosedexception: * bye javamail exception: java.io.ioexception: connection dropped server?     @ com.sun.mail.imap.imapfolder.handleidle(imapfolder.java:3199)     @ com.sun.mail.imap.idlemanager.processkeys(idlemanager.java:370)     @ com.sun.mail.imap.idlemanager.select(idlemanager.java:281)     @ com.sun.mail.imap.idlemanager.access$200(idlemanager.java:137)     @ com.sun.mail.imap.idlemanager$1.run(idlemanager.java:164)     @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1142)     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:617)     @ java.lang.thread.run(thread.java:745) debug imap: idlemanager waiting... 

thanks, bye


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -