Class EmailContentRendering
- Namespace
- MailFathom.Application.EmailContent.Rendering
- Assembly
- MailFathom.Application.dll
Carries everything one parse of a stored message yields for a reader.
public sealed record EmailContentRendering : IEquatable<EmailContentRendering>
- Inheritance
-
EmailContentRendering
- Implements
- Inherited Members
Remarks
One rendering answers every question this read asks, because they are all answers about the same parse. Producing the attachment list from a second walk could describe a different message than the body did, and producing the headers from the stored row would describe a narrower one.
The bound is applied here rather than by the caller, because only the code holding the message can cut a body before the expensive part of reading it happens: markup is bounded before it is parsed and sanitized, so the work a crafted body can demand stays proportional to the bound instead of to what the sender wrote.
PlainTextBody is empty rather than absent for a message that displayed nothing, and empty as
well when BodyIsEncrypted is set. The marker is what separates the two, so a caller never has to
read an empty string as evidence about the message.
Constructors
- EmailContentRendering(EmailContentHeaders, EmailBodyRepresentation, EmailBodyRepresentation?, bool, EmailAttachmentSummary)
Carries everything one parse of a stored message yields for a reader.
Properties
- Attachments
What the message carries besides its body, with one entry per attachment and no bytes.
- BodyIsEncrypted
Whether the message's own body arrived inside a cryptographic envelope and could not be read here.
- Headers
The normalized headers the message displays.
- PlainTextBody
The body as a reader would see it, already bounded and carrying its truncation metadata.
- SanitizedHtmlBody
The sanitized HTML body, present only when it was asked for and the message actually has an HTML body part.