Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions email.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down