浏览代码

add missing Content-Transfer-Encoding (#61)

bughou 7 年之前
父节点
当前提交
219afe2e04
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      email.go

+ 2 - 0
email.go

@@ -331,8 +331,10 @@ func (e *Email) Bytes() ([]byte, error) {
 		headers.Set("Content-Type", "multipart/alternative;\r\n boundary="+w.Boundary())
 	case len(e.HTML) > 0:
 		headers.Set("Content-Type", "text/html; charset=UTF-8")
+		headers.Set("Content-Transfer-Encoding", "quoted-printable")
 	default:
 		headers.Set("Content-Type", "text/plain; charset=UTF-8")
+		headers.Set("Content-Transfer-Encoding", "quoted-printable")
 	}
 	headerToBytes(buff, headers)
 	io.WriteString(buff, "\r\n")