finish
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
)
|
||||
|
||||
func SendEmail(subject string, text string, to ...string) bool {
|
||||
//TODO: add logs
|
||||
e := email.Email{
|
||||
From: "nCovTrack Server<1853633282@qq.com>",
|
||||
To: to,
|
||||
@@ -20,6 +19,7 @@ func SendEmail(subject string, text string, to ...string) bool {
|
||||
smtp.PlainAuth("", global.ServerSettings.Email.Account, global.ServerSettings.Email.Password, global.ServerSettings.Email.Host),
|
||||
)
|
||||
if err != nil {
|
||||
fmt.Println("Send failed")
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user