bamboo_postmark
bamboo_postmark copied to clipboard
Quoting recipient names with punctuation
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]"
Do you think adding quote marks around the name of the recipient is within scope of this library?
Cheers
I have a pull request that might solve this issue: https://github.com/pablo-co/bamboo_postmark/pull/41