Table of Contents

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

accountId MailAccountId

The local account whose server is listed.

transportSecurityPolicy MailTransportSecurityPolicy

The connection and authentication policy the implementation must obey.

cancellationToken CancellationToken

Cancels 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.