SendWelcomeEmail sends welcome email
(email string)
| 64 | |
| 65 | // SendWelcomeEmail sends welcome email |
| 66 | func (a *App) SendWelcomeEmail(email string) error { |
| 67 | from, err := GetSenderEmail(a.BaseURL, defaultSender) |
| 68 | if err != nil { |
| 69 | return errors.Wrap(err, "getting the sender email") |
| 70 | } |
| 71 | |
| 72 | data := mailer.WelcomeTmplData{ |
| 73 | AccountEmail: email, |
| 74 | BaseURL: a.BaseURL, |
| 75 | } |
| 76 | |
| 77 | if err := a.EmailBackend.SendEmail(mailer.EmailTypeWelcome, from, []string{email}, data); err != nil { |
| 78 | return errors.Wrapf(err, "sending welcome email for %s", email) |
| 79 | } |
| 80 | |
| 81 | return nil |
| 82 | } |
| 83 | |
| 84 | // SendPasswordResetEmail sends password reset email |
| 85 | func (a *App) SendPasswordResetEmail(email, tokenValue string) error { |