MCPcopy
hub / github.com/dnote/dnote / SendPasswordResetAlertEmail

Method SendPasswordResetAlertEmail

pkg/server/app/email.go:113–129  ·  view source on GitHub ↗

SendPasswordResetAlertEmail sends email that notifies users of a password change

(email string)

Source from the content-addressed store, hash-verified

111
112// SendPasswordResetAlertEmail sends email that notifies users of a password change
113func (a *App) SendPasswordResetAlertEmail(email string) error {
114 from, err := GetSenderEmail(a.BaseURL, defaultSender)
115 if err != nil {
116 return errors.Wrap(err, "getting the sender email")
117 }
118
119 data := mailer.EmailResetPasswordAlertTmplData{
120 AccountEmail: email,
121 BaseURL: a.BaseURL,
122 }
123
124 if err := a.EmailBackend.SendEmail(mailer.EmailTypeResetPasswordAlert, from, []string{email}, data); err != nil {
125 return errors.Wrapf(err, "sending password reset alert email for %s", email)
126 }
127
128 return nil
129}

Callers 1

PasswordResetMethod · 0.80

Calls 2

GetSenderEmailFunction · 0.85
SendEmailMethod · 0.65

Tested by

no test coverage detected