I have another issue similar to #54, when sending an email with custom headers or attachments, but also setting the From address to one with special characters
(I have included 3 examples but there's probably many more):
There's an error when building the message content (different errors depending on the example, here's the first one):
** (MatchError) no match of right hand side value: {:error, {1, :smtp_rfc5322_parse, [~c"syntax error before: ", [~c"\"[Schmidt]\""]]}}
code: |> SesAdapter.deliver(%{})
stacktrace:
(gen_smtp 1.2.0) /home/michal/bamboo_ses/deps/gen_smtp/src/mimemail.erl:999: :mimemail.encode_header_value/2
(gen_smtp 1.2.0) /home/michal/bamboo_ses/deps/gen_smtp/src/mimemail.erl:963: :mimemail.encode_headers/1
(gen_smtp 1.2.0) /home/michal/bamboo_ses/deps/gen_smtp/src/mimemail.erl:210: :mimemail.encode/2
(bamboo_ses 0.4.4) lib/bamboo/adapters/message/content.ex:87: BambooSes.Message.Content.build_content/7
(bamboo_ses 0.4.4) lib/bamboo/adapters/message.ex:136: BambooSes.Message.put_content/2
(bamboo_ses 0.4.4) lib/bamboo/adapters/ses_adapter.ex:51: Bamboo.SesAdapter.deliver/2
I found that there is a helper for preparing and correctly encoding addresses, but in the Raw renderer it is not used (maybe the fix would be to call it there?)
👋🏻 Hi!
I have another issue similar to #54, when sending an email with custom headers or attachments, but also setting the From address to one with special characters (I have included 3 examples but there's probably many more):
There's an error when building the message content (different errors depending on the example, here's the first one):
I found that there is a helper for preparing and correctly encoding addresses, but in the Raw renderer it is not used (maybe the fix would be to call it there?)