jordan-wright / email

Robust and flexible email library for Go
MIT License
2.61k stars 324 forks source link

Format From, To, Cc & Bcc for RFC1342 #115

Closed Fank closed 4 years ago

Fank commented 4 years ago

EMails needed to be formated like this:

   From: =?US-ASCII?Q?Keith_Moore?= <moore@cs.utk.edu>
   To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@dkuug.dk>
   CC: =?ISO-8859-1?Q?Andr=E9_?= Pirard <PIRARD@vm1.ulg.ac.be>

Right now the complete content of the field will be encoded which results in

   From: =?US-ASCII?Q?Keith_Moore <moore@cs.utk.edu>?=
   To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen <keld@dkuug.dk>?=
   CC: =?ISO-8859-1?Q?Andr=E9_ Pirard <PIRARD@vm1.ulg.ac.be>?= 

which causes following in mail clients:

unknown image

https://tools.ietf.org/html/rfc1342

Fank commented 4 years ago

Added more tests to ensure everything works as intended

jordan-wright commented 4 years ago

This LGTM. Thanks @Fank!