Why folder.GetContents() looping only 50 email?


I have just installed Aspose.Email from Nuget and loaded .pst file which has 13000 emails.
but looping folder.GetContents() for “Inbox” only 50 email not more than that.

Is this due to trail version?

     int i = 0;
      foreach (MessageInfo messageInfo in folder.GetContents()) // Inbox folder 13000+ emails
              i += 1;
             txtlog.Text += (i) + Environment.NewLine

Why it is not looping all messages?



Can you please share source email along with complete working sample code so that we may further investigate to help you out.


Sorry I did not understand source email. I am loading PST file which is 5 GB but Inbox has 1300 emails and looping after 50 email messages.

ReadPST.zip (4.6 KB)

Please see attached VS windows application in C# for sample code.



I have observed the sample code provided by you. Unfortunately, the PST file is missing. Can you please provide sample PST reproducing the issue. You may also consider using our 30 days free trial license if you don’t have license to verify the API.