SendPasswordResetAlertEmail sends email that notifies users of a password change
(email string)
| 111 | |
| 112 | // SendPasswordResetAlertEmail sends email that notifies users of a password change |
| 113 | func (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 | } |
no test coverage detected