Documentation
¶
Index ¶
Constants ¶
const SequenceKey ctxKey = "sequence"
SequenceKey is the context key runSend() uses to pass each broker's position in the current batch through to a Sender, so implementations (e.g. the SMTP sender) can fold it into a generated message ID.
Variables ¶
This section is empty.
Functions ¶
func ValidateEmail ¶
ValidateEmail checks for injection characters and RFC 5322 compliance
Types ¶
type SMTPSender ¶
type SMTPSender struct {
// contains filtered or unexported fields
}
func NewSMTPSender ¶
func NewSMTPSender(cfg config.SMTPConfig, from string) *SMTPSender
func NewSender ¶
func NewSender(cfg config.EmailConfig) (*SMTPSender, error)
NewSender builds the sender for cfg. SMTP is the only provider; the check exists so a stale provider: line in config.yaml fails loudly instead of silently sending over SMTP anyway.