emersion / go-message

✉️ A streaming Go library for the Internet Message Format and mail messages
MIT License
382 stars 111 forks source link

mail: decode headers when using AddressList #161

Closed konimarti closed 1 year ago

konimarti commented 1 year ago

Decode address names when calling header.AdressList by first trying header.Text instead of header.Get.

Encoded names will now be correctly decoded before sent to the addresslist parser, i.e. "=?utf-8?Q?Mitsuha?= Miyamizu" will be shown as "Mitsuha Miyamizu".

emersion commented 1 year ago

ParseAddressList already decodes non-quoted words.

konimarti commented 1 year ago

Yes, thanks. What I attempted, should be handled downstream. Sorry for the noise, I'll close the pr.