Skip to content

Commit

Permalink
mail: warn against using Address.String for a header field
Browse files Browse the repository at this point in the history
  • Loading branch information
emersion committed Oct 26, 2020
1 parent e1abe21 commit 9280793
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mail/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ type Address mail.Address
// String formats the address as a valid RFC 5322 address. If the address's name
// contains non-ASCII characters the name will be rendered according to
// RFC 2047.
//
// Don't use this function to set a message header field, instead use
// Header.SetAddressList.
func (a *Address) String() string {
return ((*mail.Address)(a)).String()
}
Expand Down

0 comments on commit 9280793

Please sign in to comment.