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

Set correct email message encoding #19978

Merged

Conversation

4lexvav
Copy link
Contributor

@4lexvav 4lexvav commented Dec 26, 2018

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 the Zend\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)

  1. Fixed issue E-Mail subject not showing utf-8 characters #19977: E-Mail subject not showing utf-8 characters

Manual testing scenarios (*)

  1. Create an e-mail template containing the "Ő" letter in the subject. For example, based on the Newsletter Subscription Success email template.
  2. Change Success Email Template at the system Newsletter settings.
  3. Subscribe for newsletter.
  4. View the email in your email client. In my case, macOS Mail.app.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Dec 26, 2018

CLA assistant check
All committers have signed the CLA.

@magento-engcom-team
Copy link
Contributor

Hi @4lexvav. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-engcom-team magento-engcom-team added this to the Release: 2.3.1 milestone Dec 26, 2018
@magento-engcom-team
Copy link
Contributor

Hi @VladimirZaets, thank you for the review.
ENGCOM-3744 has been created to process this Pull Request

@ghost
Copy link

ghost commented Jan 4, 2019

Hi @4lexvav, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@magento-engcom-team
Copy link
Contributor

Hi @4lexvav. Thank you for your contribution.
We will aim to release these changes as part of 2.3.1.
Please check the release notes for final confirmation.

1 similar comment
@magento-engcom-team
Copy link
Contributor

Hi @4lexvav. Thank you for your contribution.
We will aim to release these changes as part of 2.3.1.
Please check the release notes for final confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants