This project is read-only.

Sorted Mail

Topics: Feature Requests, Issues
Apr 23, 2014 at 4:59 PM

The download/search method from your lib doens't "download" the mails order by date, for now I can only order mails when I download all of them from a folder. Do you have some kind of sample that first retrieves the mails already sorted, so I can for example download the 10 most recent mails?

Thank you in advance.
Apr 24, 2014 at 11:35 AM
Hi andrelucas13,

I made a patch for this, you can take a look at the latest source code in the repository. Now, the message UIds are sorted descendingly, so this search:
var msgs = client.Folders.Inbox.Search("ALL", MessageFetchMode.ClientDefault, 10);
will give you 10 most recent messages in correct order.


Apr 24, 2014 at 12:39 PM
Thank you very much.

Best regards,

André Lucas
Jun 23, 2014 at 6:13 PM
I just tried client.Forlders.Inbox.Search("ALL", MessageFetchMode.ClientDefault, 10). It's not returning the 10 most recent messages, but oldest 10 messages. How do you get the most recent messages?
Jun 23, 2014 at 8:09 PM
Hi miliu99,

are you using the latest release? (


Jan 3, 2015 at 8:12 AM
I'm using release and it gives me 10 oldest messages in descending order for that query
Feb 10, 2015 at 1:22 PM
Edited Feb 10, 2015 at 1:29 PM
Same probleme here. Is there any specific filter, that I could use, so the messages would be downloaded in descending order? The version of lib I am using is and the server is Exchange 2010.