Table of Contents

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

account MailAccountId

The caller's account.

folderId string

The folder.

cancellationToken CancellationToken

Propagates 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.write and mailfathom.mail.read, both of which an act needs.