update email encoding
This commit is contained in:
4
email.go
4
email.go
@@ -60,11 +60,11 @@ func SendMail(addr, from, subject, body string, to []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
msg := "Date:" + time.Now().Format("Mon, 02 Jan 2006 15:04:05 -0700") + "\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" +
|
||||
"Content-Type: text/plain; charset=\"UTF-8\"\r\n" +
|
||||
"Content-Transfer-Encoding: base64\r\n" +
|
||||
"\r\n" + base64.StdEncoding.EncodeToString([]byte(body))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user