Skip to content

Commit

Permalink
enable welcome mail
Browse files Browse the repository at this point in the history
  • Loading branch information
ianic committed Nov 25, 2021
1 parent d1ddcee commit 85cedee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
7 changes: 0 additions & 7 deletions backend/api/signup/mailing.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ func (r *Signup) sendActivationCode(email, name, activationCode string) error {
toEmail := email
fromEmail := texts.MailFrom
subject := texts.ActivationMailSubject

// body, err := texts.ActivationMailBody(name, activationCode)
// if err != nil {
// log.Printf("failed to get mail body: %s", err)
// return err
// }

body, err := texts.ActivationHTMLMailBody(name, activationCode)
if err != nil {
log.Printf("failed to get mail body: %s", err)
Expand Down
12 changes: 6 additions & 6 deletions backend/api/signup/signup.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ func (r *Signup) activate(ctx context.Context, req signup.ActivateRequest) (*sig
}

func (r *Signup) Activate(ctx context.Context, req signup.ActivateRequest) (string, error) {
ar, _, err := r.activate(ctx, req)
ar, rr, err := r.activate(ctx, req)
if err != nil {
return "", err
}
// sending activation disabled
// if err := r.sendWelcomeMail(rr.Email, rr.Name); err != nil {
// log.Printf("failed to sedn welcome mail error %s", err)
// // do nothing, not critical
// }

if err := r.sendWelcomeMail(rr.Email, rr.Name); err != nil {
log.Printf("failed to sedn welcome mail error %s", err)
// do nothing, not critical
}
return ar.Token, nil
}

Expand Down

0 comments on commit 85cedee

Please sign in to comment.