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
roleOutgoingRecipientRoleThe header to name them in.
addressstringThe addr-spec the author supplied, unparsed.
displayNamestringThe name to write beside it, or null to write the address alone.
Returns
- NamedRecipient
The recipient the author named.
Exceptions
- ArgumentException
Thrown when
addressis blank, which names nobody at all.- ArgumentOutOfRangeException
Thrown when
roleis not a declared role.