Table of Contents

Method ByContactName

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

ByContactName(OutgoingRecipientRole, ContactDisplayName, string?)

Names a recipient by the name the owner recorded for them.

public static NamedRecipient ByContactName(OutgoingRecipientRole role, ContactDisplayName contactName, string? contactAddress = null)

Parameters

role OutgoingRecipientRole

The header to name them in.

contactName ContactDisplayName

The whole name the owner wrote down.

contactAddress string

Which of their addresses to use, or null for the one they prefer.

Returns

NamedRecipient

The recipient the author named.

Exceptions

ArgumentException

Thrown when contactAddress is supplied blank.

ArgumentOutOfRangeException

Thrown when role is not a declared role.