MCPcopy Index your code
hub / github.com/dnote/dnote / SendWelcomeEmail

Method SendWelcomeEmail

pkg/server/app/email.go:66–82  ·  view source on GitHub ↗

SendWelcomeEmail sends welcome email

(email string)

Source from the content-addressed store, hash-verified

64
65// SendWelcomeEmail sends welcome email
66func (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
85func (a *App) SendPasswordResetEmail(email, tokenValue string) error {

Callers 2

CreateMethod · 0.80
TestSendWelcomeEmailFunction · 0.80

Calls 2

GetSenderEmailFunction · 0.85
SendEmailMethod · 0.65

Tested by 1

TestSendWelcomeEmailFunction · 0.64