update email and stop on error
This commit is contained in:
3
email.go
3
email.go
@@ -60,7 +60,8 @@ func SendMail(addr, from, subject, body string, to []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
msg := "To: " + strings.Join(to, ",") + "\r\n" +
|
||||
msg := "Date:" + time.Now().Format("Mon, 02 Jan 2006 15:04:05 -0700") + "\r\n" +
|
||||
"To: " + strings.Join(to, ",") + "\r\n" +
|
||||
"From: " + from + "\r\n" +
|
||||
"Subject: " + subject + "\r\n" +
|
||||
"Content-Type: text/html; charset=\"UTF-8\"\r\n" +
|
||||
|
||||
Reference in New Issue
Block a user