Skip to content

Commit

Permalink
Merge pull request #12 from mjibson/master
Browse files Browse the repository at this point in the history
Set Content-ID on attachments
  • Loading branch information
jordan-wright committed Oct 1, 2014
2 parents e9c33a3 + 16125ff commit 9c459b2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions email.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func (e *Email) Attach(r io.Reader, filename string, c string) (a *Attachment, e
at.Header.Set("Content-Type", "application/octet-stream")
}
at.Header.Set("Content-Disposition", fmt.Sprintf("attachment;\r\n filename=\"%s\"", filename))
at.Header.Set("Content-ID", fmt.Sprintf("<%s>", filename))
at.Header.Set("Content-Transfer-Encoding", "base64")
e.Attachments = append(e.Attachments, at)
return at, nil
Expand Down

0 comments on commit 9c459b2

Please sign in to comment.