Class MailBodyCleaning
- Namespace
- MailFathom.Application.EmailContent.Cleaning
- Assembly
- MailFathom.Application.dll
Draws one message as the third rendering: the reduced document with what the sender wrapped it in dropped.
public sealed class MailBodyCleaning
- Inheritance
-
MailBodyCleaning
- Inherited Members
Remarks
The pass exists because the reduction is deterministic and the remainder is not. What survives a reduction and is still not the message — a preheader written for an inbox preview, a category menu, a row of social icons, a pasted header block, a postal address, a legal clause — is separated from the message by what it means rather than by how it is marked up, and every heuristic tried against that bought one shape of mail and misfired on another.
What is asked is the outline and what comes back is a partition. A producer never emits message text, so the document this composes is built from the blocks the reduction already produced: every block it keeps is identical to what the reduced view would have drawn, and fidelity is therefore a property of the contract rather than of how firmly an instruction asked for it.
Nothing is derived ahead of a reader and nothing is stored. One open is one proposal, and opening the message again asks again — which is what makes this the same kind of state the reader's ask for remote pictures is, and what keeps a first test of whether the view is worth having from writing a table nobody has decided the shape of.
Every failure serves the ordinary reduced document and says which failure it was. The reader is never handed an empty pane and never handed a silently different view, and a producer that dropped every block is read as an answer this cannot use rather than as a message with nothing in it.
Constructors
- MailBodyCleaning(EmailContentReader, IMailBodyCleaner, MailboxScopeResolver, SensitiveContentEgressGuard, AccessAuthorization)
Initializes the pass over the read it cleans and the producer that proposes the cleaning.
Fields
- MaximumAttempts
How many times one body is put to a producer before the ordinary reduced document is served.
Methods
- CleanAsync(StoredEmailId, bool, CancellationToken)
Cleans one of the acting caller's messages, or says why the reduced document is what came back.