frequently we are getting below error ,our mail box contains more than 1 lakh mails ChilkatLog: Expunge: Not connected to an IMAP server. Not in the authenticated state --Expunge --ChilkatLog
current work around i had done checking imap.connection before expunge if connection is not available reconnect again and call the expunge.
we are calling expunge for each 10 mails ,is this correct or expugne should call after marking all the mails with deleted if that the case if the application corrputs before calling expugne and after marking deleted true . please guide. Note: one more observation reading is faster with marking delete ,is their any other way to do above the work.
Thanks and regards, Harish Chepuri
asked Apr 27 '13 at 06:03
If a Chilkat IMAP method call that sends a command to the IMAP server returns with a "Not connected to an IMAP server." in the LastErrorText, it means the connection was lost in a previous method call (or the connection was never made in the first place). The return value of each Chilkat IMAP method call must be checked for success/failure. If it failed, you might wish to call the Imap.IsConnected() method (note that it's a method and not a property) to check to see if the connection to the server still exists.
In your code snippet above, the calls to SetMailFlag and Expunge are NOT checked for success/failure.
answered Apr 29 '13 at 08:14