Explorar o código

Added Mime-Version header - fixes #8

Jordan %!s(int64=11) %!d(string=hai) anos
pai
achega
e90cd6ac74
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      email.go

+ 3 - 0
email.go

@@ -115,6 +115,9 @@ func (e *Email) msgHeaders() textproto.MIMEHeader {
 	if _, ok := res["Date"]; !ok {
 		res.Set("Date", time.Now().Format(time.RFC1123Z))
 	}
+	if _, ok := res["Mime-Version"]; !ok {
+		res.Set("Mime-Version", "1.0")
+	}
 	for field, vals := range e.Headers {
 		if _, ok := res[field]; !ok {
 			res[field] = vals