Table of Contents

Method RecordAsync

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

RecordAsync(StoredEmailId, MailFolderAlias, MailboxMutationRequester, CancellationToken)

Writes down one move, against the email and the folder a caller named.

public Task<AuthoredMailRelocationResult> RecordAsync(StoredEmailId storedEmailId, MailFolderAlias destination, MailboxMutationRequester requester, CancellationToken cancellationToken)

Parameters

storedEmailId StoredEmailId

The email to move, as a listing, a search, or a read returned it.

destination MailFolderAlias

MailFathom's own name for the folder to move it into.

requester MailboxMutationRequester

The invocation asking, which is what decides whether asking again is the same request.

cancellationToken CancellationToken

Cancels the resolution and the write.

Returns

Task<AuthoredMailRelocationResult>

The record that was opened, or the reason none was.

Remarks

The destination is resolved before the commit is opened, because resolving a folder the account maps and does not mirror reaches the mail server, and a transaction must never be held open across one.

Exceptions

ArgumentNullException

Thrown when requester is null.

ArgumentException

Thrown when destination names no folder.

PrincipalNotAuthorizedException

Thrown when the caller does not hold the moving grant.