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

[Backport-2.2] Plain Text Emails are now sent with correct MIME Encoding #23537

Merged
merged 3 commits into from
Jul 4, 2019
Merged

[Backport-2.2] Plain Text Emails are now sent with correct MIME Encoding #23537

merged 3 commits into from
Jul 4, 2019

Conversation

gwharton
Copy link
Contributor

@gwharton gwharton commented Jul 2, 2019

Original PR (*)

  1. [2.3] Plain Text Emails are now sent with correct MIME Encoding #23535

Description (*)

Since Magento switched to Zend Framework 2 (2.2.8+ and 2.3.0+) Plain text emails are no longer sent as mime.

This PR ensures that all emails, regardless of type are sent as MIME.

Unit tests now check correct message encoding for both html and plain text emails.

Fixed Issues (if relevant)

  1. Character Encoding in Plain Text Emails Fails since 2.2.8/2.3.0 due to emails no longer being sent as MIME #22103: Character Encoding in Plain Text Emails Fails since 2.2.8/2.3.0 due to emails no longer being sent as MIME
  2. NO sender in email header for magento 2 sales order and password change emails to customer #23199: NO sender in email header for magento 2 sales order and password change emails to customer

Manual testing scenarios (*)

Backend
=======
Marketing -> Email Templates -> Add New Template
    Template Name = Newsletter Success Plain
    Subject = Success Subject
    Template Content = ✅Success Body
    Convert to Plain Text
    Save Template
Marketing -> Email Templates -> Add New Template
    Template Name = Newsletter Success Html
    Subject = Success Subject
    Template Content = <html><body>✅Success Body</body></html>
    Save Template
Store -> Configuration -> General -> Store Email Addresses
    General Contact
        Sender Name = Owner Name
        Sender Email = owner@domain.com
Store -> Configuration -> Customers -> Newsletter -> Subscription Options
    Success Email Template = Newsletter Success Plain

Frontend
========
Subscribe to newsletter

Ensure email received contains the following headers

MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Ensure email client interprets ✅ correctly in message body

Backend
=======
Store -> Configuration -> Customers -> Newsletter -> Subscription Options
    Success Email Template = Newsletter Success Html

Frontend
========
Subscribe to newsletter

Ensure email received contains the following headers

MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit

Ensure email client interprets ✅ correctly in message body

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 are green)

@m2-assistant
Copy link

m2-assistant bot commented Jul 2, 2019

Hi @gwharton. 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 give me test instance - deploy test instance based on PR changes
  • @magento give me 2.2-develop instance - deploy vanilla Magento instance

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

@ghost ghost assigned aleron75 Jul 3, 2019
@aleron75 aleron75 added the Auto-Tests: Covered All changes in Pull Request is covered by auto-tests label Jul 3, 2019
@magento-engcom-team
Copy link
Contributor

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

@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

@m2-assistant
Copy link

m2-assistant bot commented Jul 4, 2019

Hi @gwharton, 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 magento-engcom-team added this to the Release: 2.2.10 milestone Jul 4, 2019
@gwharton gwharton deleted the 2.2-develop-plaintextmime branch July 6, 2019 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: Mail Progress: accept Release Line: 2.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants