Class MailDocument
- Namespace
- MailFathom.Application.EmailContent.Rendering.Document
- Assembly
- MailFathom.Application.dll
A message's HTML body reduced to the closed document tree a pane draws natively.
public sealed record MailDocument : IEquatable<MailDocument>
- Inheritance
-
MailDocument
- Implements
- Inherited Members
Remarks
This is what reading a message means on the default path, and its isolation statement is an absence rather than a policy: the client receives no markup and runs no engine, so script cannot run because nothing that could run it is here, and a remote resource cannot be fetched because — unless the reader asked otherwise — there is no remote reference in the document to fetch. A rendering defect therefore cannot leak by fetching.
The counts are what the reader is told instead of being handed a blocked reference. Nothing here is a placeholder pointing at a removed address and nothing is a flag telling a renderer to abstain: the addresses are gone, and the number is what says something was there.
A link is the one sender-controlled absolute address the default carries on purpose, because showing a reader where a link goes before they follow it needs the address. That is not a licence to resolve one for any other purpose.
The whole of this is mail. It is personal data of the reader and of whoever wrote to them, so no part of it reaches a log line, a span attribute, an exception message, or a telemetry event.
Constructors
- MailDocument(int, IReadOnlyList<MailDocumentBlock>, MailDocumentRefusal, int, int, int, int, bool)
A message's HTML body reduced to the closed document tree a pane draws natively.
Fields
- CurrentSchemaVersion
The revision of this contract that this build writes and reads.
Properties
- Blocks
The blocks, in reading order, which is empty for a refused body.
- InlineImageCount
How many pictures were resolved from the message's own parts and inlined.
- Refusal
Why the body is read as its plain text instead, or that it is not.
- RemovedRemoteReferenceCount
How many references to somebody else's server were removed rather than carried.
- RetainedRemoteImageCount
How many remote pictures the reader asked for and this document therefore carries.
- SchemaVersion
Which revision of this contract the document was written against.
- Truncated
Whether the reduction stopped at a bound rather than at the end of the body.
- UndrawnInlineImageCount
How many of the message's own pictures were left undrawn because they were beyond the bound.
Methods
- Reduced(IReadOnlyList<MailDocumentBlock>, int, int, int, int, bool)
Creates the document of a body that was reduced.
- Refused(MailDocumentRefusal)
Creates the document of a body the pane reads as plain text instead, and says why.