Author |
|
Camiel79 Newbie
Joined: 15 September 2009 Location: Netherlands
Online Status: Offline Posts: 3
|
Posted: 15 September 2009 at 8:54am | IP Logged
|
|
|
I'm trying to download 'new' messages from an Imap mailbox.
imp.Search(true, "NEW", null) returns the UID's of the new messages. Works great.
But when I try to download the corresponding messages (one at a time) using imp.DownloadEntireMessage I sometimes get an MailBeeImapMessageIndexNotFoundException! A second or third attempt (using try/catch) is required to succesfully download the message.
Also, when I use DownloadEntireMessages(searchResults.ToString(), true), I sometimes get an empty collection! Even when the UidCollection returned by Search contains a number of existing UID's.
Am I doing something wrong?
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 16 September 2009 at 1:05am | IP Logged
|
|
|
First of all, please make sure that only UIDs and not message indexes are used throughout the code.
The issues you've described might be caused by simultaneous access to IMAP account by more than one client. Thus, make sure you're the only person accessing this account, no other applications access it, only one instance of your application is launched at a time and it has only one thread working with the account.
If all the above conditions are met, please enable logging IMAP session into a file, reproduce the issue and provide us with the log file for examination. It's important to keep server greeting information intact.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
Camiel79 Newbie
Joined: 15 September 2009 Location: Netherlands
Online Status: Offline Posts: 3
|
Posted: 16 September 2009 at 12:31pm | IP Logged
|
|
|
Thanks Igor,
You where right. Another process was also accessing the mailbox. Since both clients use push mail (using Idle), they simultaneously tried to download the message.
I now make sure only one client accesses the IMAP mailbox.
|
Back to Top |
|
|