Documentation
¶
Overview ¶
Package mailer sends plain-text e-mail through an SMTP server. It exists for password reset links and nothing else, so it stays small: one message, one recipient, text only.
Index ¶
Constants ¶
View Source
const ( StartTLS = "starttls" // plain connection upgraded with STARTTLS, usually port 587 TLS = "tls" // TLS from the first byte, usually port 465 None = "none" // no encryption: only accepted for a server on this machine )
Transport security modes.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Host string
Port int
Username string // empty: no authentication
Password string
From string // address, optionally with a display name
TLS string // StartTLS (default), TLS or None
// DialControl, when set, is the Control function of the connection's dialer: it sees the address
// the host name resolved to, before the connection is made, and may refuse it.
DialControl func(network, address string, c syscall.RawConn) error
}
Config describes the SMTP server and the sender address.
Click to show internal directories.
Click to hide internal directories.