Table of Contents

Struct OutgoingRecipient

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

Names one person an outgoing email is addressed to, and the header they are named in.

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

Remarks

The display name a composed message writes is deliberately absent. What the envelope needs is the address, what an attempt compares is the normalized form of it, and what an outgoing record is obliged to hold is the smallest thing that answers both — so the name a sender chose to write stays in the stored MIME and nowhere else.

A recipient address is personal data of somebody who is not this mailbox's owner. It is on the record because a send cannot be resumed without it, and it reaches no log line, metric dimension, span attribute, or exception message.

The address is here even when a contact was what the author named, and the contact is beside it rather than instead of it. A record naming only the person would answer the wrong question a year later: a message sent to somebody whose address changed afterwards was sent to the address they had, and an attempt resuming from the record has to offer that address rather than whichever one the book holds now.

Fields

MaximumAddressLength

The greatest length an address may have, which bounds the column it is stored in.

Properties

Address

Gets the address the message is offered to.

Contact

Gets the contact the address was resolved from, or null when the author supplied the address itself.

Role

Gets the header the composed message names this recipient in.

Methods

Create(EmailAddress, OutgoingRecipientRole, ContactId?)

Names one recipient of an outgoing email.

ToString()

Describes the recipient by the header they are named in, and never by their address.