MCPcopy Index your code
hub / github.com/coder/coder / NewSMTPHandler

Function NewSMTPHandler

coderd/notifications/dispatch/smtp.go:58–60  ·  view source on GitHub ↗
(cfg codersdk.NotificationsEmailConfig, log slog.Logger)

Source from the content-addressed store, hash-verified

56}
57
58func NewSMTPHandler(cfg codersdk.NotificationsEmailConfig, log slog.Logger) *SMTPHandler {
59 return &SMTPHandler{cfg: cfg, log: log}
60}
61
62func (s *SMTPHandler) Dispatcher(payload types.MessagePayload, titleTmpl, bodyTmpl string, helpers template.FuncMap) (DeliveryFunc, error) {
63 // First render the subject & body into their own discrete strings.

Callers 4

TestSMTPDispatchFunction · 0.92
defaultHandlersFunction · 0.92
TestSMTPFunction · 0.92

Calls

no outgoing calls

Tested by 3

TestSMTPDispatchFunction · 0.74
TestSMTPFunction · 0.74