Sorted Mail

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

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.
Coordinator
Apr 24, 2014 at 10: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.

Greets,

Pavel
Apr 24, 2014 at 11:39 AM
Thank you very much.

Best regards,

André Lucas
Jun 23, 2014 at 5: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?
Coordinator
Jun 23, 2014 at 7:09 PM
Hi miliu99,

are you using the latest release? (2.0.0.16)?

Greets,

Pavel
Jan 3, 2015 at 7:12 AM
I'm using 2.0.0.16 release and it gives me 10 oldest messages in descending order for that query
Feb 10, 2015 at 12:22 PM
Edited Feb 10, 2015 at 12: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 2.0.0.16 and the server is Exchange 2010.