This project is read-only.

How to get Unseen MessageListRequest?

Mar 8, 2010 at 11:42 AM


I know there was already a previous Discussion regarding Unseen Message in the ConsoleTest and have been unsuccessfully experimenting with the

code in InterIMAPGUITest for some hours to list the Unseen Msg UIDs in the messageListBox.

Can anyone show me the right direction to implement this?

Thank you.


Mar 26, 2010 at 1:44 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. This method is also not currently asynchronous, so using it in a GUI app will block the GUI thread while it is running. In the future i will be adding a formal async new message request that will solve this problem. You could also modify the NewMessageRequest class as it is and add your own RequestCompletedCallback event and fire that event in the delegate of the SearchRequest object. Just be sure to remove the while loop that checks for the folder count so that you don't block the UI. In your event handler, you can get the folder that it just checked like this: IFolder folder = req.PreCommand.ParameterObjs[0] as IFolder;
Nov 29, 2010 at 9:54 PM
Edited Nov 30, 2010 at 4:55 PM

--future comment to come --