Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendRemoval ¶ added in v0.9.0
func SendRemoval(ctx context.Context, s *SMTPSender, eng *template.Engine, tmpl string, np config.NamedProfile, from string, b broker.Broker) (*history.Record, error)
SendRemoval renders the removal request for b, sends it from `from`, and returns the history record for the attempt (sent or failed) for the caller to store. A render failure returns an error and no record: nothing was attempted.
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.