Skip to content

Commit

Permalink
Decode quoted-printable in a single part message (#111)
Browse files Browse the repository at this point in the history
Co-authored-by: hala alajlan <[email protected]>
  • Loading branch information
halaalajlan and hala alajlan authored May 31, 2020
1 parent c069f37 commit 4030fe0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions email.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ func parseMIMEParts(hs textproto.MIMEHeader, b io.Reader) ([]*part, error) {
}
} else {
// If it is not a multipart email, parse the body content as a single "part"
if hs.Get("Content-Transfer-Encoding") == "quoted-printable" {
b = quotedprintable.NewReader(b)

}
var buf bytes.Buffer
if _, err := io.Copy(&buf, b); err != nil {
return ps, err
Expand Down

0 comments on commit 4030fe0

Please sign in to comment.