elixir-mail
elixir-mail copied to clipboard
Refactor header parsing to better support RFC 2047
RFC 2047 specifically states that decoding encoded words before parsing a header may not work
NOTE: Decoding and display of encoded-words occurs after a structured field body is parsed into tokens. It is therefore possible to hide 'special' characters in encoded-words which, when displayed, will be indistinguishable from 'special' characters in the surrounding text. For this and other reasons, it is NOT generally possible to translate a message header containing 'encoded-word's to an unencoded form which can be parsed by an RFC 822 mail reader.
I have refactored the parser to decode words after parsing header values. This fixes #180