This project is read-only.

Check for new messages - Asynchronous ?

Mar 24, 2010 at 10:26 AM


I have seen this discussion ( 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 ?



Mar 26, 2010 at 1: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.