Skip to content

Commit

Permalink
Don't use CharsetReader when Part is attachement
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoMouR committed Nov 22, 2017
1 parent b6ea523 commit 6dac6f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion part.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (p *Part) buildContentReaders(r io.Reader) error {
}
p.decodedReader = contentReader

if valid {
if valid && !isAttachment(p.Header){
// decodedReader is good; build character set conversion reader
if p.Charset != "" {
if reader, err := newCharsetReader(p.Charset, contentReader); err == nil {
Expand Down

0 comments on commit 6dac6f5

Please sign in to comment.