Documentation
¶
Overview ¶
Package smtpmail sends the mails of the API, such as login links, through an authenticated SMTP server reached over implicit TLS (RFC 8314).
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConfig = errors.New("smtp: incomplete configuration")
ErrConfig means a Config misses a value.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Addr is the host and port of the server, which speaks TLS at once,
// such as "smtp.mail.ovh.net:465".
Addr string
// Username and Password authenticate with AUTH PLAIN, sent over TLS
// only.
Username string
Password []byte
// From is the sender address.
From domain.Email
// RootCAs are the authorities the server's certificate must chain to;
// nil means those of the system.
RootCAs *x509.CertPool
// Now dates the mails; nil means time.Now.
Now func() time.Time
// Random draws the message identifiers; nil means crypto/rand.Reader.
Random io.Reader
}
Config configures a Sender.
Click to show internal directories.
Click to hide internal directories.