mailjet / mailjet-gem

[API v3] Mailjet official Ruby GEM
https://dev.mailjet.com
Other
130 stars 72 forks source link

Decode email addresses when passed down from action mailer #119

Closed andre-l-github closed 7 years ago

andre-l-github commented 7 years ago

Hi there,

yesterday I realized that sending mails to email addresses containing german umlaute via rails ActionMailer does not work. The issue is that ActionMailer encodes those email addresses with special characters, for example:

jürgen.baumann@plano-staging.andrelahs.de

will be turned to:

=?UTF-8?B?asO8cmdlbi5iYXVtYW5uQHBsYW5vLXN0YWdpbmcuYW5kcmVsYWhzLmRl?=

Which is apparently required by smtp servers, however the Mailjet API does not like that and returns 400 Bad Request.

You can find attached one approach to fix for Version 3.1.

Cheers,

Andre

latanasov commented 7 years ago

Hi @andre-l-github , thank you for the PR. I will soon review it.

PS: Don't mind the Travis failure, it didn't pick the public/private keys for security reasons.