Closed LetThereBeDwight closed 8 months ago
It actually is the case for a bunch of headers which are read case-sensitively. A fix might be to downcase name here and then downcase any header pattern match. Eg: this line would become:
defp parse_header_value("to", value),
From what I could gather, the spec does not enforce a specific case for headers.
Hey @LetThereBeDwight - I'm fairly sure this issue will have been resolved by https://github.com/DockYard/elixir-mail/commit/c728ffc74121ba668965cc5e528129f82d631e19.
Hey @LetThereBeDwight - I'm fairly sure this issue will have been resolved by c728ffc.
Yea that should resolve this issue as well, I can close this one.
Version
0.2.3
Test Case
This test will fail, it is a trimmed down version of the test defined at test/mail/parsers/rfc_2822_test.exs:42 - the only functional difference is that line 46
CC: The Dude <dude@example.com>, Batman <batman@example.com>
is that the header is defined as "Cc" as opposed to "CC"Steps to reproduce
See above and run that test - not entirely sure what the spec says about this but email from gmail routed through AWS SES -> SNS -> S3 has the header defined as Cc.
Expected Behavior
Should be able to parse the cc header properly.
Actual Behavior
Cannot properly parse cc recipients if the header is defined with "Cc"