Handle text-plain parts in multipart/mixed email
diff --git a/parsemail.go b/parsemail.go
index 996e357..40e3ee4 100644
--- a/parsemail.go
+++ b/parsemail.go
@@ -239,6 +239,13 @@
if err != nil {
return textBody, htmlBody, attachments, embeddedFiles, err
}
+ } else if contentType == contentTypeTextPlain {
+ ppContent, err := ioutil.ReadAll(part)
+ if err != nil {
+ return textBody, htmlBody, attachments, embeddedFiles, err
+ }
+
+ textBody += strings.TrimSuffix(string(ppContent[:]), "\n")
} else if isAttachment(part) {
at, err := decodeAttachment(part)
if err != nil {