From fb02d525d22b132de95cda3cb6d7fce3cb3a4c28 Mon Sep 17 00:00:00 2001 From: shoopea Date: Sat, 8 Oct 2022 11:15:09 +0800 Subject: [PATCH] update email encoding --- email.go | 4 ++-- version.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/email.go b/email.go index 39bcd85..a9d39a9 100644 --- a/email.go +++ b/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)) diff --git a/version.go b/version.go index b8ec386..d506661 100644 --- a/version.go +++ b/version.go @@ -1,6 +1,6 @@ // Code generated by version.sh (@generated) DO NOT EDIT. package main -var githash = "a7ee0bf" -var buildstamp = "2022-10-08_02:58:04" -var commits = "53" -var version = "a7ee0bf-b53 - 2022-10-08_02:58:04" +var githash = "7f9cf49" +var buildstamp = "2022-10-08_03:14:52" +var commits = "54" +var version = "7f9cf49-b54 - 2022-10-08_03:14:52"