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
storedEmailIdStoredEmailIdThe email to move, as a listing, a search, or a read returned it.
destinationMailFolderAliasMailFathom's own name for the folder to move it into.
requesterMailboxMutationRequesterThe invocation asking, which is what decides whether asking again is the same request.
cancellationTokenCancellationTokenCancels 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
requesteris null.- ArgumentException
Thrown when
destinationnames no folder.- PrincipalNotAuthorizedException
Thrown when the caller does not hold the moving grant.