Documentation
¶
Overview ¶
Package email is a thin SMTP sink. It accepts a smtp.Addr-style config at construction time and delivers via net/smtp. No HTML formatting, no templating — that is the publisher's job.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Addr string // host:port, e.g. smtp.example.com:587
From string // RFC 5322 mailbox-list
Username string
Password string
}
Config is the SMTP connection config. Username may be empty for relays without auth (e.g. local Postfix).
type Recipient ¶
type Recipient struct {
Address string
}
Recipient is the typed target for the email sink. Address must be a valid RFC 5322 mailbox.
type Sink ¶
type Sink struct {
// contains filtered or unexported fields
}
Sink implements sinks.Sink via net/smtp.SendMail.
func NewNamed ¶
NewNamed constructs a Sink with a custom name. Used by the factory so multiple email sinks (one per backend) can be registered.
func (*Sink) DecodeRecipient ¶
DecodeRecipient round-trips a persisted DLQ recipient back into the typed Recipient. Used by RedisDLQ.Replay.