Add References, make In-Reply-To RFC compliant
j3s j3s@cyberia.club
Fri, 06 Dec 2019 19:21:32 -0600
1 files changed,
4 insertions(+),
1 deletions(-)
jump to
M
mail/main.go
→
mail/main.go
@@ -453,7 +453,10 @@ if len(e.MessageID) > 0 {
fmt.Fprintf(&buf, "Message-ID: %s\r\n", e.MessageID) } if len(e.InReplyTo) > 0 { - fmt.Fprintf(&buf, "In-Reply-To: %s\r\n", strings.Join(e.InReplyTo, ",")) + fmt.Fprintf(&buf, "In-Reply-To: <%s>\r\n", strings.Join(e.InReplyTo, "> <")) + } + if len(e.References) > 0 { + fmt.Fprintf(&buf, "References: <%s>\r\n", strings.Join(e.References, "> <")) } if len(e.Header.Get("List-Id")) > 0 { fmt.Fprintf(&buf, "List-Id: %s\r\n", e.Header.Get("List-Id"))