Documentation
¶
Overview ¶
Package notify sends a periodic e-mail digest of open tasks over SMTP. It is deliberately small: STARTTLS submission (port 587) via the standard library, a plain-text and an HTML body built from the metadata index, and a background ticker. Disabled unless VELLUM_NOTIFY=on and SMTP settings are present.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Enabled bool
Host string
Port string
User string
Pass string
From string
To []string
Interval time.Duration
PublicURL string
}
Config holds SMTP settings and the digest cadence.
type Message ¶ added in v1.13.0
type Message struct {
Subject string
Text string
HTML string
Open int // open tasks (in progress + backlog)
}
Message is one rendered digest: a plain-text and an HTML body of the same content.
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier runs the periodic digest.
func (*Notifier) Loop ¶
Loop sends a digest shortly after boot (to confirm the setup) and then every cfg.Interval until ctx is cancelled.
func (*Notifier) SendDigest ¶
func (n *Notifier) SendDigest()
SendDigest builds and sends one digest now. Tasks done within the last interval are listed as well.