Number of emails in a folder

Hi


is there a quick way to get
  • number of emails
  • number of unread emails
of a specified mailbox folder? I know I can get the emails using ImapClient.ListMessages, or similar in Exchange, but it downloaded all the emails and may take too long. I need a quick way to just get the numbers.

Thanks.

Xu

Hi Xu,

You can retrieve this information about any folder using the ImapFolderInfo class. It can give you:

  • Total messages count
  • New Messages count

Please refer to our online article Getting Folders Information for a working example and let us know if you need further assistance in this regard.

Hi


I found the counts in ImapFolderInfo, but not ExchangeFolderInfo, am I missing anything?

Thanks

Hi Xu,


We are sorry for a delayed response.

I am afraid to share that I was unable to find any such property for Exchange related messages and have requested assistance from the development team in this regard. We’ll update you here as soon as possible after receiving the feedback in this regard.