commit | 71e25d5dadf3793a515cf39540084fcf25028c8a | [log] [tgz] |
---|---|---|
author | Edwin Love <edwin.love@headforwards.com> | Tue Apr 02 14:07:44 2019 +0100 |
committer | Edwin Love <edwin.love@headforwards.com> | Tue Apr 02 14:19:32 2019 +0100 |
tree | 1ceb2f4830c74a5b26d2d92e37c443d1717f04c5 | |
parent | f8d8da2e32010f61216ab56bf0f9fe1fb8392d95 [diff] |
Let parser handle email with unencoded attachment
diff --git a/parsemail.go b/parsemail.go index 996e357..a62426a 100644 --- a/parsemail.go +++ b/parsemail.go
@@ -302,6 +302,13 @@ } return bytes.NewReader(dd), nil + } else if strings.EqualFold(encoding, "7bit") { + dd, err := ioutil.ReadAll(part) + if err != nil { + return nil, err + } + + return bytes.NewReader(dd), nil } return nil, fmt.Errorf("Unknown encoding: %s", encoding)