Free Support Forum - aspose.com

Is ExchangeWebServicesClient.ListMessages hard limited to 1000?

ExchangeMailboxInfo mailbox = client_aspose.GetMailboxInfo();
return client_aspose.ListMessages(mailbox.InboxUri, 1000000);

there are always exactly 1000 items in the resulting ExchangeMessageInfoCollection, whenever there are > 1000 items in the inbox

when I try ListMessages without the max items argument, and there are > 1000 items in the inbox, the resulting list has 0 items (which is obviously wrong)
return client_aspose.ListMessages(mailbox.InboxUri);

I didn’t see any obvious paging options. Is there a way to get ALL of the messages in the resultant list, or at least perform some kind of paging?

Hi,

Thank you for inquiry.

I am sorry, but I could not reproduce the issue at my end. I tested by downloading over 1600 messages from Exchange 2010 mailbox. Here is the code that gets the messages.

NetworkCredential credential = new NetworkCredential(username, password, domain);
ExchangeWebServiceClient client = new ExchangeWebServiceClient(mailboxURI, username, password, domain);
ExchangeMessageInfoCollection msgInfoColl = client.ListMessages(client.MailboxInfo.InboxUri);

Could you please specify which version of Aspose.Network dll and Exchange Server are you using?

6.7.0.0

C:\Program Files (x86)\Aspose\Aspose.Network for .NET\Bin\net3.5\Aspose.Network.dll

I implemented what ListMessages should have given me, using the Microsoft dll.

ExchangeVersion.Exchange2007_SP1 w/autodiscover URL
Microsoft.Exchange.WebServices.Data.Item.Id.UniqueId can be used with aspose classes where needed.

oops wrong thread!

edit2: actually,

Can this be a feature request? To use paging to get all of the items.