Skip to content
Open
Show file tree
Hide file tree
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: 4 additions & 2 deletions pkg/message/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,10 @@ func getTextPartHeader(hdr message.Header, body []byte, mimeType rfc822.MIMEType

hdr.SetContentType(string(mimeType), params)

// Use quoted-printable for all text/... parts
hdr.Set("Content-Transfer-Encoding", "quoted-printable")
// Use quoted-printable for all text/... parts UNLESS header is already set
if !hdr.Has("Content-Transfer-Encoding") {
hdr.Set("Content-Transfer-Encoding", "quoted-printable")
}

return hdr
}
Expand Down
4 changes: 3 additions & 1 deletion pkg/message/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ func (p *Parser) AttachEmptyTextPartIfNoneExists() bool {
h := message.Header{}

h.Set("Content-Type", "text/plain;charset=utf8")
h.Set("Content-Transfer-Encoding", "quoted-printable")
if !h.Has("Content-Transfer-Encoding") {
h.Set("Content-Transfer-Encoding", "quoted-printable")
}

p.Root().AddChild(&Part{
Header: h,
Expand Down