Skip to content

Commit

Permalink
Let parser handle email with unencoded attachment
Browse files Browse the repository at this point in the history
  • Loading branch information
Edwin Love committed Apr 2, 2019
1 parent f8d8da2 commit 71e25d5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions parsemail.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,13 @@ func decodePartData(part *multipart.Part) (io.Reader, error) {
return nil, err
}

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
}

Expand Down

0 comments on commit 71e25d5

Please sign in to comment.