Documentation
¶
Overview ¶
Package mail sends transactional email (account confirmation) over SMTP. It is intentionally tiny: standard net/smtp with STARTTLS, configured from AGENTBBS_SMTP_* env vars. When unconfigured, Configured() reports false and the caller logs the confirmation link instead of sending it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Host string // smtp server host (no port)
Port string // default 587 (STARTTLS)
User string // auth user; empty = no auth
Pass string
From string // envelope + From: header
}
Config is an SMTP relay. Host+From are the minimum for Configured().
func ConfigFromEnv ¶
func ConfigFromEnv() Config
ConfigFromEnv reads AGENTBBS_SMTP_{HOST,PORT,USER,PASS,FROM}.
func (Config) Configured ¶
Configured reports whether email can actually be sent.
Click to show internal directories.
Click to hide internal directories.