chore: extract mail to it's own service #181
Some checks failed
Build Docker Image / Explore-Gitea-Actions (push) Failing after 45s

This commit is contained in:
2024-09-27 23:21:37 +02:00
parent a70138f2f7
commit fe7178ea03
4 changed files with 18 additions and 5 deletions

View File

@@ -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())
}