Table of Contents

Method AtAddress

Namespace
MailFathom.Application.Mail.Delivery.Addressing
Assembly
MailFathom.Application.dll

AtAddress(OutgoingRecipientRole, string, string?)

Names a recipient by the address the author wrote.

public static NamedRecipient AtAddress(OutgoingRecipientRole role, string address, string? displayName = null)

Parameters

role OutgoingRecipientRole

The header to name them in.

address string

The addr-spec the author supplied, unparsed.

displayName string

The name to write beside it, or null to write the address alone.

Returns

NamedRecipient

The recipient the author named.

Exceptions

ArgumentException

Thrown when address is blank, which names nobody at all.

ArgumentOutOfRangeException

Thrown when role is not a declared role.