From 1a8301657c64f47bcc415725ce010c456ef72e2e Mon Sep 17 00:00:00 2001 From: nemunaire Date: Tue, 13 Nov 2018 01:24:41 +0100 Subject: [PATCH] Avoid SMTP bug with .\n --- lost.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lost.go b/lost.go index 795b341..97f7a52 100644 --- a/lost.go +++ b/lost.go @@ -115,7 +115,7 @@ func lostPassword(w http.ResponseWriter, r *http.Request) { m.SetHeader("From", "noreply@qarnot-computing.net") m.SetHeader("To", email) m.SetHeader("Subject", "SSO qarnot.net: password recovery") - m.SetBody("text/plain", "Hello " + cn + "!\n\nSomeone, and we hope it's you, has requested to reset your account password.\nIn order to continue, go to: https://login.qarnot.net/reset?l=" + r.PostFormValue("login") + "&t=" + token + "\n\nBest regards,\n-- \nQarnot SSO") + m.SetBody("text/plain", "Hello " + cn + "!\n\nSomeone, and we hope it's you, requested to reset your account password. \nIn order to continue, go to:\nhttps://login.qarnot.net/reset?l=" + r.PostFormValue("login") + "&t=" + token + "\n\nBest regards,\n-- \nQarnot SSO") // Using local sendmail: delegate to the local admin sys the responsability to transport the mail s := gomail.SendFunc(func(from string, to []string, msg io.WriterTo) error {