Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseEmailAddress ¶
ParseEmailAddress unescapes an email address, and splits the local part from the domain part. An error is returned if the local or domain parts fail validation following the guidelines in RFC3696.
func ValidateDomainPart ¶
ValidateDomainPart returns true if the domain part complies to RFC3696, RFC1035. Used by ParseEmailAddress().
Types ¶
type Addressing ¶
Addressing handles email address policy.
func (*Addressing) ExtractMailbox ¶
func (a *Addressing) ExtractMailbox(address string) (string, error)
ExtractMailbox extracts the mailbox name from a partial email address.
func (*Addressing) NewRecipient ¶
func (a *Addressing) NewRecipient(address string) (*Recipient, error)
NewRecipient parses an address into a Recipient.
func (*Addressing) ShouldAcceptDomain ¶
func (a *Addressing) ShouldAcceptDomain(domain string) bool
ShouldAcceptDomain indicates if TempMail accepts mail destined for the specified domain.
func (*Addressing) ShouldStoreDomain ¶
func (a *Addressing) ShouldStoreDomain(domain string) bool
ShouldStoreDomain indicates if TempMail stores mail destined for the specified domain.
type Recipient ¶
type Recipient struct { mail.Address // LocalPart is the part of the address before @, including +extension. LocalPart string // Domain is the part of the address after @. Domain string // Mailbox is the canonical mailbox name for this recipient. Mailbox string // contains filtered or unexported fields }
Recipient represents a potential email recipient, allows policies for it to be queried.
func (*Recipient) ShouldAccept ¶
ShouldAccept returns true if TempMail should accept mail for this recipient.
func (*Recipient) ShouldStore ¶
ShouldStore returns true if TempMail should store mail for this recipient.