Documentation
¶
Overview ¶
Package notify delivers messages to people.
SEAM 4 of 4. The engine sends a small, fixed set of messages — a sign-in link, an invitation — and does not care how they arrive. An application wrapping the engine supplies Slack, Discord, or a queue by implementing one method, without touching anything that composes a message.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mailer ¶
Mailer delivers a message.
func NewLog ¶
NewLog returns a Mailer that writes messages to the log.
This is the zero-configuration default, and deliberately not an error. It is the break-glass path: if accounts are switched on and mail delivery then breaks, the sign-in link in the log is the only way back into the dashboard. That is safe only because reading the log already implies host access, and it is the reason the whole body is logged rather than a summary.
func NewResend ¶
NewResend returns a Mailer that sends through Resend's HTTP API.
Chosen alongside SMTP because a self-hoster with no relay still needs mail, and an API key is less to get wrong than a relay. The HTTP call is written directly rather than pulling in an SDK: it is one POST, and a dependency that exists to save fifteen lines is a dependency to keep updated forever.
func NewSMTP ¶
func NewSMTP(cfg SMTPConfig) (Mailer, error)
NewSMTP returns a Mailer that sends through an SMTP relay.
Configuration is validated here rather than at first send, because the first send is a sign-in attempt — and a relay misconfiguration discovered then looks to the operator like sign-in being broken.