Skip to content

Commit 9280793

Browse files
committed
mail: warn against using Address.String for a header field
1 parent e1abe21 commit 9280793

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mail/address.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ type Address mail.Address
1414
// String formats the address as a valid RFC 5322 address. If the address's name
1515
// contains non-ASCII characters the name will be rendered according to
1616
// RFC 2047.
17+
//
18+
// Don't use this function to set a message header field, instead use
19+
// Header.SetAddressList.
1720
func (a *Address) String() string {
1821
return ((*mail.Address)(a)).String()
1922
}

0 commit comments

Comments
 (0)