feat(mail): #132 unify env variables and send mails with smtp
This commit is contained in:
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"me-fit/middleware"
|
||||
"me-fit/service"
|
||||
"me-fit/utils"
|
||||
|
||||
"database/sql"
|
||||
"net/http"
|
||||
@@ -13,6 +14,10 @@ func getHandler(db *sql.DB) http.Handler {
|
||||
|
||||
router.HandleFunc("/", service.HandleIndexAnd404(db))
|
||||
|
||||
router.HandleFunc("/mail", func(w http.ResponseWriter, r *http.Request) {
|
||||
utils.SendWelcomeMail("timwundenberg@outlook.de")
|
||||
})
|
||||
|
||||
// Serve static files (CSS, JS and images)
|
||||
router.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("./static/"))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user