We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Getting a filtered list of messages from Exchange

I am trying to get the first or last message on the exchange server, but I am unable to find any method that allows me to restrict the search results for N messages.

Is it possible?

Hi,

Thank you for inquiry.

Please use overloaded ExchangeWebServiceClient.ListMessages() method that takes the maximum number of messages as parameter, this will restrict the results to N messages.

Also have a look at http://www.aspose.com/documentation/.net-components/aspose.email-for-.net/filtering-messages-from-exchange-mailbox-based-on-sender-recipient-or-date.html page to apply different filtering criteria on listing messages.