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?

@ItsMeSri,

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.

1 Like

@ItsMeSri,

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.

I have the exact same problem.

Can any of you share a .pst file for testing? I can’t share mine due to privacy reasons

This guy also has the same problem:

Hello @KeepingItReal,

Thank you for your interest to our product.

You are right. The trial or evaluation version has limitations. “The evaluation version provides almost all functionality of the product with certain limitations.” - Licensing|Documentation

However, there’s another way to test its functionality. Try our temporary license without limitations. Please refer to How to get a Temporary License?