
Invalid header value detected

Hi @rafaelstz. Thank you for your report.
To help us process this issue please make sure that you provided the following information:
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:
@magento give me 2.3-develop instance - upcoming 2.3.x release
For more details, please, review the Magento Contributor Assistant documentation.
@rafaelstz do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
Hi @andrewbess. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.[x] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.
[ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
2.3-develop branch@magento give me 2.3-develop instance to deploy test instance on Magento infrastructure. 2.3-develop branch, please, add the label Reproduced on 2.3.x.@magento give me 2.3-develop instance
Hi @rafaelstz. Thank you for your request. I'm working on Magento 2.3-develop instance for you
Hi @rafaelstz, here is your Magento instance.
Admin access: https://i-25542-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.
Hello @rafaelstz
Magento uses "zendframework/zend-mail" to send emails.
This module validates headers according to RFC 2822.
Please take a look at this document (section 2.2).
As you can see, your sender name has the symbol "谩" with code 195.
So, I think this task can be closed.
@magento-engcom-team how do you think about it?
Hi @magento-engcom-team. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.
[ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.3-develop branchDetails
- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 5. Add label Issue: Confirmed once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @andrewbess,
But Magento's core requires the version, the Magento 2.3.2 doesn't have this issue.
the same happens for order mails if the customer name contains non ascii characters. So this issue is valid and even pretty critical
Hi @davidverholen. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.[x] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.
[x] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
[x] 4. Verify that the issue is reproducible on 2.3-develop branchDetails
- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[x] 5. Add label Issue: Confirmed once verification is complete.
[x] 6. Make sure that automatic system confirms that report has been added to the backlog.
:white_check_mark: Confirmed by @davidverholen
Thank you for verifying the issue. Based on the provided information internal tickets MC-28945 were created
Issue Available: @davidverholen, _You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself._
This issue is a duplicate of https://github.com/magento/magento2/issues/24902 and already fixed in MR https://github.com/magento/magento2/pull/24906
Magento did not fixed in 2.3.4
still happens on EE 2.3.3
If customer name contains special characters like this Rafael Corr锚a. The order confirmation email failed to send, which is critical.
This solution worked for me 馃帀 !
In the EmailMessage class vendor/magento/framework/Mail/EmailMessage.php the encoding can be set if passed in an argument in the constructor, but it is null by default.
if ($encoding) {
$this->message->setEncoding($encoding);
}
So, I think the best practice use type in di.xml in your module without rewrite and plugins.
<type name="Magento\Framework\Mail\EmailMessage">
<arguments>
<argument name="encoding" xsi:type="string">utf-8</argument>
</arguments>
</type>