From 5671ada373585aa7d9c307d27029bf2e6084ff20 Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Tue, 5 Sep 2023 18:38:15 +0800 Subject: [PATCH] fix --- fs_template/email_register.tpl | 4 ---- fs_template/get_reset_password_html.tpl | 4 ---- server/auth/internal/logic/email_manager.go | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/fs_template/email_register.tpl b/fs_template/email_register.tpl index e88553c5..c5b8cb2a 100644 --- a/fs_template/email_register.tpl +++ b/fs_template/email_register.tpl @@ -1,9 +1,5 @@ Subject: Please confirm your {{ .CompanyName }} account -MIME-version: 1.0; -Content-Type: text/html; -charset=\"UTF-8\"; - Dear {{ .UserName }}, Thank you for registering an account with {{ .CompanyName }}. We are thrilled to have you join our community! diff --git a/fs_template/get_reset_password_html.tpl b/fs_template/get_reset_password_html.tpl index d9eaa6d7..4cd78739 100644 --- a/fs_template/get_reset_password_html.tpl +++ b/fs_template/get_reset_password_html.tpl @@ -1,9 +1,5 @@ Subject: Password Reset Request for Your {{ .CompanyName }} Account -MIME-version: 1.0; -Content-Type: text/html; -charset=\"UTF-8\"; - Dear {{ .UserName }}, We have received your request to reset the password for your {{ .CompanyName }} account. diff --git a/server/auth/internal/logic/email_manager.go b/server/auth/internal/logic/email_manager.go index 4d1bd84a..15ac3c0c 100644 --- a/server/auth/internal/logic/email_manager.go +++ b/server/auth/internal/logic/email_manager.go @@ -222,7 +222,7 @@ func RenderEmailTemplate(templateName, companyName, confirmationLink, senderName } var result bytes.Buffer - // result.Write([]byte("MIME-version: 1.0;\nContent-Type: text/html; charset=\"UTF-8\";\n\n")) + result.Write([]byte("MIME-version: 1.0;\nContent-Type: text/html; charset=\"UTF-8\";\n\n")) err := tpls.ExecuteTemplate(&result, templateName, data) if err != nil { log.Fatal(err)