bamboo_postmark icon indicating copy to clipboard operation
bamboo_postmark copied to clipboard

Quoting recipient names with punctuation

Open ukutaht opened this issue 4 years ago • 1 comments

First of all, thanks for the library.

I have a problem sending email to one of my customers who has included punctuation in their username. I use the to: [{user_name, user_email}] format to configure the recipient.

When the first field includes a comma e.g. acme, Inc, the postmark API returns the following error:

Here is the response:
"{\"ErrorCode\":300,\"Message\":\"Error parsing 'To': Illegal email address 'acme'. It must contain the '@' symbol.\"}"

Postmark's documentation states that

For email addresses that have names or titles with punctuation, you should quote them as such: "To" : ""Joe Receiver, jr" [email protected]"

ref

Do you think adding quote marks around the name of the recipient is within scope of this library?

Cheers

ukutaht avatar Jun 25 '20 09:06 ukutaht

I have a pull request that might solve this issue: https://github.com/pablo-co/bamboo_postmark/pull/41

vinibrsl avatar Nov 15 '22 11:11 vinibrsl