Skip to content

Conversation

@romsahel
Copy link
Contributor

The case was encountered in production.

Fixes the error below for emls without a name property in the Content-Type header:
e.g.:

Content-Type: application/pdf;
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="20250410-1947.pdf"

The error:

     The following arguments were given to Mail.Parsers.RFC2822.parse_encoded_word/2:

         # 1
         ["application/pdf"]

         # 2
         []

     Attempted function clauses (showing 3 out of 3):
         defp parse_encoded_word("", _opts)
         defp parse_encoded_word(<<"=?", value::binary>>, opts)
         defp parse_encoded_word(<<char::utf8, rest::binary>>, opts)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants