How to handle IMAP session and store connection?

276 views Asked by At

I am trying to persist the store(GmailStore) object which i get from IMAP Session in memory and am using this store object for opening folder to check the changes in the folder at regular intervals. This will work for some days after that i will not be able to get any changes in the folder and its not even throwing any exception, can you guys help me out here plz.

Everytime before opening the folder I am checking the following condition to make sure the store is connected i.e,

       if(!store.isconnected){

           //connect to IMAP session again and get the store object and update it in the memory

        }
0

There are 0 answers