Documentation
¶
Overview ¶
Package email is a simple email validation package. Package validates email address string to RFC requirements and performs a DNS lookup for the MX records using the local DNS settings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrInvalidFormat is an error generated when the format is incorrect ErrInvalidFormat = errors.New("invalid email format") //ErrInvalidDomainNoNameServers is an error generated when the domain returns no Name Server records ErrInvalidDomainNoNameServers = errors.New("invalid email domain, unable to find name servers records") //ErrInvalidDomainNoMXRecords is an error generated when the domain returns no MX records ErrInvalidDomainNoMXRecords = errors.New("invalid email domain no mx records found") )
Functions ¶
func Normalize ¶
Normalize - Trim whitespaces, extra dots in the hostname and converts to Lowercase.
func ValidateDomainRecords ¶
ValidateDomainRecords - validates an email address domain's NS and MX records via a DNS lookup
func ValidateFormat ¶
ValidateFormat - validates an email address meets rfc 822 format via a regex
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.