Skip to content

Commit

Permalink
fix MIME-Version header (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
arturwwl committed Sep 19, 2022
1 parent bfa2489 commit 93b483a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions email.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,10 @@ func (email *Email) AddHeader(header string, values ...string) *Email {
return email
}

// Set header to correct canonical Mime
header = textproto.CanonicalMIMEHeaderKey(header)
if header != "MIME-Version" {
// Set header to correct canonical Mime
header = textproto.CanonicalMIMEHeaderKey(header)
}

switch header {
case "Sender":
Expand Down

0 comments on commit 93b483a

Please sign in to comment.