-
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
Set correct email message encoding #19978
Set correct email message encoding #19978
Conversation
Hi @4lexvav. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Hi @VladimirZaets, thank you for the review. |
Hi @4lexvav, thank you for your contribution! |
Hi @4lexvav. Thank you for your contribution. |
1 similar comment
Hi @4lexvav. Thank you for your contribution. |
Description (*)
E-Mail subject not showing utf-8 characters.
I tried to investigate the problem and found that it happens because the utf-8 encoding is reset during sending an email. This happens here. The
Zend\Mail\Message::fromString
method recreates theZend\Mail\Message
object from the given string, but its default encoding is ASCII, so that the utf-8 encoding set while initializing the message gets reset.In order to eliminate the issue the encoding have to be explicitly set again, like this:
Message::fromString($this->message->getRawMessage())->setEncoding('utf-8')
.Fixed Issues (if relevant)
Manual testing scenarios (*)
Contribution checklist (*)