func New( server, port, username, password string, rootCAs *x509.CertPool, from mail.Address, logger blog.Logger, stats prometheus.Registerer, reconnectBase time.Duration, reconnectMax time.Duration) *mailerImpl
New constructs a Mailer to represent an account on a particular mail transfer agent.
func NewDryRun(from mail.Address, logger blog.Logger) *mailerImpl
NewDryRun constructs a Mailer suitable for doing a dry run. It simply logs each command that would have been run, at debug level.
BadAddressSMTPError is returned by SendMail when the server rejects a message but for a reason that doesn't prevent us from continuing to send mail. The error message contains the error code and the error message returned from the server.
type BadAddressSMTPError struct { Message string }
func (e BadAddressSMTPError) Error() string
Conn is an interface that allows sending mail. When you are done with a Conn, call Close(). Implementations are not required to be safe for concurrent use.
type Conn interface { SendMail([]string, string, string) error Close() error }
Mailer is an interface that allows creating Conns. Implementations must be safe for concurrent use.
type Mailer interface { Connect() (Conn, error) }