Method ListFoldersAsync
- Namespace
- MailFathom.Application.Folders
- Assembly
- MailFathom.Application.dll
ListFoldersAsync(MailAccountId, MailTransportSecurityPolicy, CancellationToken)
Lists every folder the account's server advertises, together with the roles it reports for them.
Task<IReadOnlyList<RemoteFolder>> ListFoldersAsync(MailAccountId accountId, MailTransportSecurityPolicy transportSecurityPolicy, CancellationToken cancellationToken)
Parameters
accountIdMailAccountIdThe local account whose server is listed.
transportSecurityPolicyMailTransportSecurityPolicyThe connection and authentication policy the implementation must obey.
cancellationTokenCancellationTokenCancels connecting, authenticating, and listing.
Returns
- Task<IReadOnlyList<RemoteFolder>>
The advertised folders, in the order the server reported them.
Exceptions
- MailboxUnavailableException
Thrown when the mail server did not serve the listing within its configured resilience budget.