Class MailDeletionRecorder
- Namespace
- MailFathom.Application.Mail.Mutations.Authoring
- Assembly
- MailFathom.Application.dll
Writes down the deletes a caller asks for, as the mutation records every requester uses.
public sealed class MailDeletionRecorder
- Inheritance
-
MailDeletionRecorder
- Inherited Members
Remarks
It is the deleting half of what ADR 0007 permits a caller to author, and it is built exactly as MailRelocationRecorder is: it asks for the grant before it asks about the email, it answers the same question about which mail may be written as about which mail may be read, and it issues no IMAP command at all. The account's own convergence pass expunges the remote occurrence, which is why an unreachable account leaves the delete pending rather than failing it.
The grant is its own, and is not the one that moves mail. Filing a message in the trash puts it somewhere the user has to look for it; this destroys the remote occurrence, so MailDelete is a name a deployment grants separately from MailMove.
What becomes of MailFathom's own copy is the account's configured answer rather than anything a caller states. Reading it here rather than where the delete completes is what makes it the answer that was true when somebody asked: completion happens in a later convergence pass that would otherwise read whatever the configuration says by then.
Which folder the message is in decides nothing here. That a client offers the act only in the trash is a sentence on a screen rather than a rule of the deployment's — the grant is what an operator withholds from a credential that may not destroy mail, and a rule action already authors the same delete from wherever the message happens to be.
A caller may ask for the record to wait before anything is asked of the mail server. Deleting is the one act with nothing to reverse it, so a question in front of it is all a person gets — and a question is answered before anybody has seen what happened. A withdrawal window is the way back that a confirmation is not: the record opens as every other does and is simply not taken in hand until the window has passed, which is what the two withdrawal routes already act on. Whether there is one, and how long it is, is the asking surface's — a client says how long a person's own notification stands, and a rule action or an MCP caller has nobody watching and asks for none.
Constructors
- MailDeletionRecorder(AccessAuthorization, MailboxScopeResolver, IAuthoredMailboxTargetReader, IAuthoredDeleteEmailDispositionReader, MailboxChangeSubmission, OptimisticConcurrencyRetryPolicy, MailAccountRunSignal, TimeProvider)
Initializes the use case over the grant it asks first, the email it is about, and the submission it writes through.
Methods
- RecordAsync(StoredEmailId, MailboxMutationRequester, TimeSpan?, CancellationToken)
Writes down one delete, against the email a caller named.