From da36d1d0e79404e84a8e1e2cb0b713f5bda6deb2 Mon Sep 17 00:00:00 2001 From: astaxie Date: Mon, 18 Jan 2016 00:03:39 +0800 Subject: [PATCH] fix the wrong io.Writer --- utils/mail.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/mail.go b/utils/mail.go index 2270b553..1d80a039 100644 --- a/utils/mail.go +++ b/utils/mail.go @@ -103,8 +103,8 @@ func (e *Email) Bytes() ([]byte, error) { } e.Headers.Set("Content-Type", fmt.Sprintf("multipart/mixed;\r\n boundary=%s\r\n", w.Boundary())) - fmt.Fprintf(w, "%s:", "Content-Type") - fmt.Fprintf(w, " %s\r\n", fmt.Sprintf("multipart/mixed;\r\n boundary=%s\r\n", w.Boundary())) + fmt.Fprintf(buff, "%s:", "Content-Type") + fmt.Fprintf(buff, " %s\r\n", fmt.Sprintf("multipart/mixed;\r\n boundary=%s\r\n", w.Boundary())) // Start the multipart/mixed part fmt.Fprintf(buff, "--%s\r\n", w.Boundary())