diff --git a/emails.go b/emails.go index efd9d1c..9242763 100644 --- a/emails.go +++ b/emails.go @@ -9,6 +9,7 @@ import ( "time" ) +// func SendRegistrationEmail(recipient, username, password string) bool { data := struct { SiteName string @@ -64,6 +65,7 @@ func SendAlertEmail(username, recipient, message string) bool { return true } + func SendRecoveryEmail(recipient, username, code string) bool { data := struct { SiteName string @@ -91,6 +93,7 @@ func SendRecoveryEmail(recipient, username, code string) bool { return true } +// func Send2faEmail(recipient, fullname, code string) error { data := struct { SiteName string @@ -153,6 +156,7 @@ func SendMail(addr, from, subject, body string, to string) error { return c.Quit() } +// func SendAlert(u int64, subject, body string) error { user, ok := GetById(u) if !ok { diff --git a/main.go b/main.go index af67ff1..2f4315f 100644 --- a/main.go +++ b/main.go @@ -24,7 +24,7 @@ type config struct { Templates templates SMTPServer string db *sqlx.DB - testing bool + Testing bool TablePrefix string } @@ -95,7 +95,7 @@ func Register(username, email, ip string) bool { log.Printf("scsusers.Register: insert failed: %s\n", err.Error()) return false } - if c.testing { + if c.Testing { return true } if SendRegistrationEmail(email, username, string(pass)) {