Table of Contents

Struct InternetMessageId

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

Names one message this system sends, in the identity every recipient's client threads it by.

public readonly record struct InternetMessageId : IEquatable<InternetMessageId>
Implements
Inherited Members

Remarks

It is the Message-ID header without its angle brackets, which is the form the header's two halves are read and written as. The brackets are delimiters of the header rather than part of the identity, and keeping them out is what lets the value be compared, stored, and logged as itself.

Minting it is a domain act rather than a formatting detail, because two properties of it are invariants a message cannot be correct without. The left half is unguessable, so nothing outside this deployment can predict the identity of a message it has not seen and forge a reply into its thread. The right half is the sending account's own domain, so the identity is globally unique without any registry — which is the whole of what RFC 5322 asks of it.

A minted identity belongs to the outgoing record it was composed for and is never minted again for that record. The message is stored once and transmitted from storage, so every attempt of one send carries the identity the first composition produced; recomposing between attempts would thread one send as two messages in every client that received both.

The type is deliberately not used for the Message-ID of arriving mail, which stays the text a sender wrote. That value is whatever another system chose to put in the header — including shapes this type refuses — and reading it is comparing what was received, never asserting what is correct.

Properties

Value

Gets the identity as the header carries it, without the angle brackets that delimit it there.

Methods

Mint(string)

Mints an identity for one message the named domain is sending.

ToString()

Returns the fully qualified type name of this instance.