Documentation
¶
Index ¶
- Variables
- func DialTimeout(addr string, timeout time.Duration) (*smtp.Client, error)
- func TestValidateFormat(t *testing.T)
- func TestValidateHost(t *testing.T)
- func TestValidateHostAndUser(t *testing.T)
- func TestValidateMX(t *testing.T)
- func ValidateFormat(email string) error
- func ValidateHost(email string) error
- func ValidateHostAndUser(serverHostName, serverMailAddress, email string) error
- func ValidateMX(email string) error
- type SmtpError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBadFormat = errors.New("invalid format") ErrUnresolvableHost = errors.New("unresolvable host") )
Functions ¶
func DialTimeout ¶
DialTimeout returns a new Client connected to an SMTP server at addr. The addr must include a port, as in "mail.example.com:smtp".
func TestValidateFormat ¶
func TestValidateHost ¶
func TestValidateHostAndUser ¶
func TestValidateMX ¶
func ValidateFormat ¶
func ValidateHostAndUser ¶
ValidateHostAndUser validate mail host and user. If host is valid, requires valid SMTP [1] serverHostName and serverMailAddress to reverse validation for prevent SPAN and BOTS. [1] https://mxtoolbox.com/SuperTool.aspx
func ValidateMX ¶
ValidateMX validate if MX record exists for a domain.
Types ¶
Click to show internal directories.
Click to hide internal directories.