Эх сурвалжийг харах

add missing Content-Transfer-Encoding (#61)

bughou 7 жил өмнө
parent
commit
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")