Documentation
¶
Overview ¶
Package email delivers Console events as plain-text email over SMTP. It uses only net/smtp from the standard library: PLAIN auth is used when a username is configured (so it should be paired with a TLS-capable submission port such as 587), and an unauthenticated send is attempted otherwise.
The actual transmission is held behind an unexported send func field that defaults to smtp.SendMail. Tests substitute it to assert the recipients, sender, and message bytes without standing up a real SMTP server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Host is the SMTP server hostname.
Host string
// Port is the SMTP server port (e.g. "587").
Port string
// Username and Password enable PLAIN auth when Username is non-empty.
Username string
Password string
// From is the envelope and header sender address.
From string
// To is the list of recipient addresses.
To []string
}
Config carries the SMTP settings for a Notifier.
Click to show internal directories.
Click to hide internal directories.