Documentation
¶
Overview ¶
Package mail sends the outbox: a Mailer drains queued mail through a Sender, either SMTP or a Log sender for development.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Log ¶
Log writes each mail to Out instead of sending it, so a dev server prints sign-in codes where the operator can read them.
type Mailer ¶
type Mailer struct {
// contains filtered or unexported fields
}
Mailer drains the outbox through a Sender.
func NewMailer ¶
func NewMailer(log zerolog.Logger, outbox core.OutboxStore, sender Sender, now func() time.Time) *Mailer
NewMailer returns a Mailer. A nil now means time.Now.
type SMTP ¶
type SMTP struct {
// contains filtered or unexported fields
}
SMTP sends through one server. smtp:// upgrades with STARTTLS and refuses a server that does not offer it, except on loopback, where a local catcher such as Mailpit speaks plain SMTP. smtps:// is TLS from the first byte. Without a user in the URL, the client does not authenticate.
Click to show internal directories.
Click to hide internal directories.