Make date conform to RFC1123
j3s j3s@cyberia.club
Fri, 06 Dec 2019 20:25:23 -0600
2 files changed,
1 insertions(+),
2 deletions(-)
M
mail/main.go
→
mail/main.go
@@ -447,7 +447,7 @@ if len(e.Cc) > 0 {
fmt.Fprintf(&buf, "Cc: %s\r\n", commaSep(e.Cc)) } if !e.Date.IsZero() { - fmt.Fprintf(&buf, "Date: %s\r\n", e.Date) + fmt.Fprintf(&buf, "Date: %s\r\n", e.Date.Format(time.RFC1123Z)) } if len(e.MessageID) > 0 { fmt.Fprintf(&buf, "Message-ID: <%s>\r\n", e.MessageID)
M
main.go
→
main.go
@@ -337,7 +337,6 @@ post := e
post.Sender = &mail.Address{l.Name, l.Address} post.Bcc = recipients post.Header["Return-Path"] = []string{"bounce-" + l.Address} - post.Header["Date"] = e.Header["Date"] // RFC 1123 post.Header["Precedence"] = []string{"list"} post.Header["List-Id"] = []string{"<" + strings.Replace(l.Address, "@", ".", -1) + ">"} post.Header["List-Post"] = []string{"<mailto:" + l.Address + ">"}