Table of Contents

Method RemoveKeywordsAsync

Namespace
MailFathom.Application.Mail.Mutations
Assembly
MailFathom.Application.dll

RemoveKeywordsAsync(EmailOccurrenceId, AuthoredMailKeywords, IMailboxMutationJournal, CancellationToken)

Takes keywords off one email in this session's folder, leaving the ones it was not asked about.

Task RemoveKeywordsAsync(EmailOccurrenceId occurrenceId, AuthoredMailKeywords keywords, IMailboxMutationJournal journal, CancellationToken cancellationToken)

Parameters

occurrenceId EmailOccurrenceId

The occurrence to relabel, which must belong to this session's account, folder, and UIDVALIDITY.

keywords AuthoredMailKeywords

The keywords to take off it.

journal IMailboxMutationJournal

The durable record of this keyword change, which exists for provenance rather than for retry safety.

cancellationToken CancellationToken

Cancels the keyword write.

Returns

Task

A task that completes when the server has recorded the removal.

Remarks

A removal needs nothing of the folder that a keyword it never kept would need, so this is the one keyword operation that is never refused for what the folder will store: taking off a keyword that is not there is what the server already reports as success.

Exceptions

ArgumentException

Thrown when occurrenceId does not belong to this session.

ArgumentNullException

Thrown when an argument is null.

MailboxUnavailableException

Thrown when the mail server did not serve the keyword write within its configured resilience budget.

MailboxFolderRecreatedException

Thrown when a recovered connection reselected the folder with a different UIDVALIDITY.