Check for new messages - Asynchronous ?

Mar 24, 2010 at 9:26 AM

Hi,

I have seen this discussion (http://interimap.codeplex.com/Thread/view.aspx?ThreadID=30562) about getting only the new arrived unread messages.

I've noticed that in Jason's code sample he is using the Synchronous client and othe sync object as - IMAPFolder, IMAPMessage etc..

Wonder if there is a way to bring the unread messages using the Asynchronous client, using Async objects - IFolder, IMessage ..

If not, should I rebuild my application [AttachmentDownloader] using the Sync client from the begining ?

any suggestions ?

Thanks.

 

Coordinator
Mar 26, 2010 at 12:27 PM
Hello, The async code currently has a nearly completed request that will generate a list of new messages for all folders in the account. It's called NewMessageRequest.cs and it's in the Common/Requests folder. The method is not complete as it doesn't actually surface the resulting message list, but that can be changed rather easily. You could also modify it to accept a folder name, IFolder object, or array of IFolder objects so that you can narrow down the number of folders you are interested in checking.