Method TryCreateFromMailbox
- Namespace
- MailFathom.Domain.Emails.Authentication
- Assembly
- MailFathom.Domain.dll
TryCreateFromMailbox(string?, out SenderDomain)
Builds a domain from a mailbox, which is what an SPF check and a From header both carry.
public static bool TryCreateFromMailbox(string? mailbox, out SenderDomain domain)
Parameters
mailboxstringThe mailbox text, either an addr-spec or a bare domain.
domainSenderDomainThe normalized domain, when one can be read from the text.
Returns
Remarks
RFC 8601 writes the SPF identity as smtp.mailfrom, whose value is a mailbox for an ordinary message and a
bare domain for one whose envelope sender is empty. Both forms are accepted here, and the domain is what follows
the last at-sign because a quoted local part is allowed to contain one.