Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET IMAP

 AfterLogic Forum : MailBee.NET IMAP
Subject Topic: Download messages from search results Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Camiel79
Newbie
Newbie
Avatar

Joined: 15 September 2009
Location: Netherlands
Online Status: Offline
Posts: 3
Posted: 15 September 2009 at 8:54am | IP Logged Quote Camiel79

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 View Camiel79's Profile Search for other posts by Camiel79
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 16 September 2009 at 1:05am | IP Logged Quote Igor

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 View Igor's Profile Search for other posts by Igor
 
Camiel79
Newbie
Newbie
Avatar

Joined: 15 September 2009
Location: Netherlands
Online Status: Offline
Posts: 3
Posted: 16 September 2009 at 12:31pm | IP Logged Quote Camiel79

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 View Camiel79's Profile Search for other posts by Camiel79
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide