Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension breaks email sending when name contains non-ASCII char #20

Closed
mokadev opened this issue Feb 4, 2021 · 5 comments
Closed

Extension breaks email sending when name contains non-ASCII char #20

mokadev opened this issue Feb 4, 2021 · 5 comments

Comments

@mokadev
Copy link

mokadev commented Feb 4, 2021

When this extension is enabled all email are sent with the non ASCII chars (ex: â, é, ...) stripped from the subject and sender name

The same problem was happening before on Magento with Dotmailer activated magento/magento2#24902

@0m3r
Copy link
Member

0m3r commented Feb 5, 2021

Yes, we filter non-ASCII characters in headers. Look like email RFC(s) don't allow non-ASCII characters in headers, but some email providers work properly with it.

laminas/laminas-mail#67
laminas/laminas-validator#7
laminas/laminas-mail#57

So I add filtering in this commit 432dbb0
And I also dislike this workaround.
You can disable this behavior here (Mail/Message/Convertor.php)
and test in your environment

p.s. if you have a nice patch please send me it

@mokadev
Copy link
Author

mokadev commented Feb 8, 2021

Hi

thanks for the answers i will test it . It's weird that if the sender's name is "Frédérique" his name become "Frdrique" ....

@0m3r
Copy link
Member

0m3r commented Feb 9, 2021

are you tried to disable filtering for itself?

https://github.com/swissup/module-email/blob/master/Mail/Message/Convertor.php#L56-L58

                    $headerValue = \Zend\Mail\Header\HeaderValue::filter(
                        $headerValue
                    );

@wilfriedwolf
Copy link
Contributor

Just created a PR to solve the problem...
Best regards and thanks for the cool (and ad-free :) module

@0m3r
Copy link
Member

0m3r commented Apr 12, 2021

@wilfriedwolf 🥇

I found my old proposal to Magento

magento/magento2#19876
magento/magento2#20441

@0m3r 0m3r closed this as completed Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants