Method DeleteAsync
- Namespace
- MailFathom.Application.Folders
- Assembly
- MailFathom.Application.dll
DeleteAsync(MailAccountId, string?, CancellationToken)
Deletes a folder, which means whatever the account's own rules make it mean.
public Task<MailFolderActOutcome> DeleteAsync(MailAccountId account, string? folderId, CancellationToken cancellationToken)
Parameters
accountMailAccountIdThe caller's account.
folderIdstringThe folder.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<MailFolderActOutcome>
The folder as the act left it, or the refusal.
Remarks
On an account whose mailbox MailFathom holds, a deletion moves the folder into the trash and a deletion of one already there erases it with its mail. On a mirrored account it deletes the folder on the mail server, or marks it deleted here, according to the account's own deletion setting. The change reported says which of them it was.
Exceptions
- PrincipalNotAuthorizedException
Thrown when the caller does not hold
mailfathom.mail.folders.writeandmailfathom.mail.read, both of which an act needs.