chore: extract mail to it's own service #181
Some checks failed
Build Docker Image / Explore-Gitea-Actions (push) Failing after 45s
Some checks failed
Build Docker Image / Explore-Gitea-Actions (push) Failing after 45s
This commit is contained in:
@@ -400,6 +400,7 @@ func HandleDeleteAccountComp(db *sql.DB, serverSettings *types.ServerSettings) h
|
||||
return
|
||||
}
|
||||
|
||||
mailService := NewMailService(serverSettings)
|
||||
go mailService.SendMail(user.Email, "Account deleted", "Your account has been deleted")
|
||||
|
||||
utils.DoRedirect(w, r, "/")
|
||||
@@ -579,6 +580,7 @@ func HandleResetPasswordComp(db *sql.DB, serverSettings *types.ServerSettings) h
|
||||
utils.TriggerToast(w, r, "error", "Internal Server Error")
|
||||
return
|
||||
}
|
||||
mailService := NewMailService(serverSettings)
|
||||
mailService.SendMail(email, "Reset Password", mail.String())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user