Table of Contents

Class GetEmailContentRequest

Namespace
MailFathom.Application.Emails.GetEmailContent
Assembly
MailFathom.Application.dll

What a caller asks for when reading emails from the local mailbox copy.

public sealed record GetEmailContentRequest : IEquatable<GetEmailContentRequest>
Inheritance
GetEmailContentRequest
Implements
Inherited Members

Remarks

Emails are named by their domain identity rather than as text, so an adapter converts a caller's strings once, at its own boundary, and a malformed identifier is refused before it reaches a use case.

The representation flags govern the whole call rather than one email each. A caller asking for markup or for attachment links wants it for what it is about to read, and a flag per identifier would make the argument list grow with the batch while answering a question no caller asks per email.

RetainRemoteImageReferences is the exception, and it is enforced rather than described: it carries one reader's consent about one message, so a request that asks for it names exactly one email. Everything else here is a preference about a call and that one is an act about a message, which is the whole difference.

Fields

MaximumEmails

The greatest number of emails one read may name.

Properties

IncludeAttachmentDownloadLinks

Gets whether to also mint a link for fetching each attachment, rather than only describe it.

IncludeMailDocument

Gets whether to also reduce each body to the document tree a reading pane draws.

IncludeSanitizedHtml

Gets whether to also return the sanitized HTML representation of each body.

IncludeSelfContainedHtml

Gets whether to also produce the message's own markup with everything that runs or reports removed.

RetainRemoteImageReferences

Gets whether the reduced document may carry this message's remote picture references.

StoredEmailIds

Gets the emails to read, in the order the caller named them, which is empty for a conversation read.

ThreadId

Gets the conversation to read, or null when the caller named the emails itself.

Methods

Create(IReadOnlyList<StoredEmailId>, bool, bool)

Creates a request from the emails a caller named.

CreateForSelection(Func<IReadOnlyList<StoredEmailId>>?, Func<EmailThreadId>?, bool, bool)

Creates a request from the two ways a caller may select what to read, refusing anything but one of them.

CreateForThread(EmailThreadId, bool, bool)

Creates a request for the messages of one conversation.