SMTPHandler is responsible for dispatching notification messages via SMTP. NOTE: auth and TLS is currently *not* enabled in this initial thin slice. TODO: implement DKIM/SPF/DMARC? https://github.com/emersion/go-msgauth
| 48 | // NOTE: auth and TLS is currently *not* enabled in this initial thin slice. |
| 49 | // TODO: implement DKIM/SPF/DMARC? https://github.com/emersion/go-msgauth |
| 50 | type SMTPHandler struct { |
| 51 | cfg codersdk.NotificationsEmailConfig |
| 52 | log slog.Logger |
| 53 | |
| 54 | noAuthWarnOnce sync.Once |
| 55 | loginWarnOnce sync.Once |
| 56 | } |
| 57 | |
| 58 | func NewSMTPHandler(cfg codersdk.NotificationsEmailConfig, log slog.Logger) *SMTPHandler { |
| 59 | return &SMTPHandler{cfg: cfg, log: log} |
nothing calls this directly
no outgoing calls
no test coverage detected