-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
M2.3.3 breaks email sending when name contains non-ASCII char #24902
Comments
Hi @elvinristi. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @elvinristi do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
@magento give me 2.3-develop instance |
Hi @elvinristi. Thank you for your request. I'm working on Magento 2.3-develop instance for you |
Hi @engcom-Bravo. Thank you for working on this issue.
|
Hi @elvinristi, here is your Magento instance. |
Confirmed following on When including non-ASCII char in Sender Name-fields under Store Email Addresses (n) and trying to subscribe to Newsletter from the footer then following message will be shown to frontend: (y) When removing special chars from "Sender Name" and re-trying newsletter subscribe, then message |
✅ Confirmed by @engcom-Bravo Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
@engcom-Bravo , just make sure you link together |
Hi @elvinristi. Thank you for working on this issue.
|
Hi @elvinristi. Unfortunately I have no access to MC-21567. But I hope Magento links such things together automatically. |
fixed in #24906 |
#24906 merged |
I am on Magento 2.3.3 and I still have this issue. |
We've worked around this on Magento 2.3.4 with the following composer patch on magento\framework diff --git a/Framework/Mail/Address.php b/Framework/Mail/Address.php
index 18e1a8c72f2..7bf55e9fd3f 100644
--- a/Framework/Mail/Address.php
+++ b/Framework/Mail/Address.php
@@ -32,6 +32,11 @@ class Address
?string $email,
?string $name
) {
+
+ if (is_string($name) && $name != '') {
+ $name = iconv('UTF-8', 'ASCII//TRANSLIT', $name);
+ }
+
$this->email = $email;
$this->name = $name;
} |
@andrewkett thanks! This fixed the issue for us on Magento 2.3.4. The other fixed mentioned here thats merged (#24906) is not enough of a solution for 2.3.4 (worked great in 2.3.3 since we applied it there). The strange part about this is that all our email communication stopped even if the $name only had a-z chars. But as I said the "hack" in /Framework/Mail/Address.php fixed all email communication. |
@andrewkett I'm using you are solution but in the emails I'm seen if customer using the ä, ü. ö those are coverted into ?," . because of this my email name is not looking good and meshed up. |
Preconditions (*)
Steps to reproduce (*)
õäöü
Expected result (*)
var/log/exception.log
Actual result (*)
Invalid header value detected
Reasons:
Potential fix is to add encoding in
vendor/magento/framework/Mail/Template/TransportBuilder.php
The text was updated successfully, but these errors were encountered: