0 votes
by (910 points)

After connecting to Outlook 365 by IMAP and selecting a folder via Imap.SelectFolderAsync (read only mode), the value in Imap.CurrentFolder.TotalMessageCount is correct, but the value in NotSeenMessageCount is exactly the same value as in TotalMessageCount.

If I do Imap.GetFolderInfoAsync, the correct values are populated.

I'm using Rbex.Imap 7.0.8816 at the moment.

Applies to: Rebex Secure Mail

1 Answer

0 votes
by (148k points)
SelectFolderAsync and GetFolderInfoAsync determine message counts by sending different commands with different responses, so different results could be retrieved if one of the commands produces wrong results with a particular IMAP server.
To determine what is actually going on, please create a debug log using Imap object's LogWriter property (as described at https://www.rebex.net/kb/logging/) showing the two commands, and either post it here or mail it to support@rebex.net for analysis.
...