Table of Contents

Class OutgoingEmailRecord

Namespace
MailFathom.Domain.Delivery
Assembly
MailFathom.Domain.dll

Reports what one durable outgoing record holds: the send that was asked for and how far it has got.

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

Remarks

The record is written before the first SMTP command and advanced as the attempt proceeds, which is what makes a non-atomic submission safe to resume: an attempt reads it and continues from the stage it names rather than starting over. A send is the first thing this system does that leaves the deployment and cannot be undone, so the record exists for one window above all — the one where the message went out and the acknowledgement did not come back — and it makes that window recognizable rather than guessed at afterwards.

It also carries the idempotency identity, which is what makes the same authored request arriving twice one delivery rather than two. The identity is enforced by a unique constraint rather than by any code declining to write.

It is derived personal data of a kind mail metadata is not: an outgoing record says who this mailbox's owner wrote to and when. It inherits the retention, deletion, and export obligations of the mail beside it, and the MIME it points at is erased with it. Nothing here is mail content — the addresses, the account, the requester, and the reply codes are the envelope and this system's own names for things, and the message itself stays in the content store.

Properties

AccountId

Gets the account the message is submitted through and sent as.

AttemptCount

Gets how many times this send has been attempted, counted before each attempt rather than after it.

AvailableAt

Gets the instant from which this send may be attempted again.

DueAt

Gets the time the send was written to leave at, or null when it was written to leave at once.

Filings

Gets every copy of this message MailFathom has put into a folder of the mailbox.

HasUnknownOutcome

Gets whether the message went out and the server's answer to it never came back.

Id

Gets what everything after the first write refers to this record by, including its stored MIME.

IsTerminal

Gets whether the record has reached a stage nothing moves it out of.

LastFailure

Gets the failure the last attempt ended in, or null while no attempt has failed.

LastFilingFailure

Gets the failure the last filing attempt ended in, or null while none has failed.

LastReplyCode

Gets the reply code the server last answered the message itself with, or null while it has answered none.

MimeByteLength

Gets how many bytes of MIME were stored for this message.

OutstandingRecipients

Gets the recipients a later attempt still offers the message to.

Principal

Gets whoever the send was asked for by, or null for a record written before that was kept.

Recipients

Gets every recipient the message names, with what the server has said about each.

RecordedAt

Gets when the intent was first written down.

Requester

Gets the authored act that asked, restored exactly as it was written down.

Stage

Gets how far along its submission sequence the message has durably reached.

StageChangedAt

Gets when the record last moved, which is what says how long a stuck send has been stuck.

Methods

FindFiling(OutgoingMailFiling)

Finds the copy of this message filed into one place, if one was.

HasMissedItsDueTime(DateTimeOffset, TimeSpan)

Reports whether the time this send was written to leave at has passed by further than a deployment allows.

IsWaitingAt(DateTimeOffset)

Reports whether this send is waiting for an instant that has not arrived yet.