Documentation ¶
Overview ¶
Package smtpclient wraps pkg/smtp to make it easy to use
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoHost is returned if no delivery host could be found ErrNoHost = errors.New("smtpclient: No host") // ErrNoTLS is returned if TLS was not offered though it was expected ErrNoTLS = errors.New("smtpclient: No TLS") // ErrNoAuth is returned if authentication was not offered though it was expected ErrNoAuth = errors.New("smtpclient: No AUTH") // ErrFinal is returned if a resend-attempt will fail ErrFinal = errors.New("smtpclient: Final error") // ErrRetry is retured if a resend-attempt might work ErrRetry = errors.New("smtpclient: Retry") )
Functions ¶
func GetMailDomain ¶
GetMailDomain returns the domain of an email address
Types ¶
type MailClient ¶
type MailClient struct { HeloHost string // How to identify in greetings, can be "" CACert []byte // CA Certificate to enforce. Can be nil to not enforce TLS User, Password string // Authentication Port int // SMTP port, defaults to 25 SmartHost string // Smarthost, for sending via a destination independent smarthost LastError error // Last error encountered LastErrorCode int // Last SMTP error code }
MailClient implements a trivial SMTP client
Click to show internal directories.
Click to hide internal directories.