diff --git a/email.go b/email.go index 57d1b53..37506f7 100644 --- a/email.go +++ b/email.go @@ -51,6 +51,8 @@ type Email struct { Headers textproto.MIMEHeader Attachments []*Attachment ReadReceipt []string + + InReplyTo string // add Reply Message-Id } // part is a copyable representation of a multipart.Part @@ -327,6 +329,10 @@ func (e *Email) msgHeaders() (textproto.MIMEHeader, error) { } res.Set("Message-Id", id) } + // add Reply Message-Id + if _, ok := res["In-Reply-To"]; !ok { + res.Set("In-Reply-To", e.InReplyTo) + } // Date and From are required headers. if _, ok := res["From"]; !ok { res.Set("From", e.From)