kalys / bamboo_ses

AWS SES adapter for Bamboo
MIT License
35 stars 24 forks source link

Error raised if local part of email address contains a '+' sign #50

Closed riverrun closed 1 year ago

riverrun commented 1 year ago

For version 0.4.0, if the local part of an email address contains a '+' sign, an error is raised, as can be seen below.

iex(1)> BambooSes.Encoding.prepare_address {nil, "alovedalongthe+TH@gmail.com"}
** (exit) {:bad_label, {:alabel, 'The label "alovedalongthe+TH"  is not a valid A-label: ulabel error={bad_label,\n                                                            {context,\n                                                             "Codepoint 43 not allowed (\'DISALLOWED\') at position 5 in \\"alovedalongthe+th\\""}}'}}
    (idna 6.1.1) bamboo_ses/deps/idna/src/idna.erl:281: :idna.alabel/1
    (idna 6.1.1) bamboo_ses/deps/idna/src/idna.erl:149: :idna.encode_1/2
    (bamboo_ses 0.4.0) lib/bamboo/adapters/message/encoding.ex:57: BambooSes.Encoding.encode_address/1

I am not sure if this page is up-to-date, by my understanding is that the '+' sign, and perhaps other special characters, is allowed in the local part of the email address.

kalys commented 1 year ago

Thank you for your feedback.

I'll fix this bug within next 3 days.

kalys commented 1 year ago

I released 0.4.1.

Thanks for reporting bug.

riverrun commented 1 year ago

Awesome! Many thanks for the quick response.