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

Mime parts of email are no more encoded with quoted printable #23643

Closed
ffauvel opened this issue Jul 9, 2019 · 9 comments
Closed

Mime parts of email are no more encoded with quoted printable #23643

ffauvel opened this issue Jul 9, 2019 · 9 comments
Assignees
Labels
Component: Framework/Mail Component: Mail Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@ffauvel
Copy link

ffauvel commented Jul 9, 2019

Preconditions (*)

  1. 2.2.8+

Steps to reproduce (*)

  1. Add a lot of css to the email template
  2. Complete an order

Expected result (*)

  1. The email is sent to the customer

Actual result (*)

  1. The email is rejected by the mail server - Error message: Message too big

Before 2.2.8, Magento was using Zend_Mail and Zend_Mime_Part (from ZF1) to send email.
The default encoding of Zend_Mime_Part was QUOTED_PRINTABLE.
In Magento 2.2.8+, they switch to Zend\Mail (from ZF2). The default encoding is 8bit.

It should be change back to QUOTED_PRINTABLE to avoid overlong lines.

@m2-assistant
Copy link

m2-assistant bot commented Jul 9, 2019

Hi @ffauvel. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

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.

@ffauvel do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Jul 9, 2019
@ffauvel
Copy link
Author

ffauvel commented Jul 9, 2019

@magento give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @ffauvel. Thank you for your request. I'm working on Magento 2.3-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @ffauvel, here is your Magento instance.
Admin access: https://i-23643-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@gwharton gwharton self-assigned this Jul 10, 2019
@m2-assistant
Copy link

m2-assistant bot commented Jul 10, 2019

Hi @gwharton. 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: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label 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 branch

    Details- 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. Verify that the issue is reproducible on 2.2-develop branch.
    Details- Add the comment @magento give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

@magento-engcom-team
Copy link
Contributor

Hi @ffauvel. Thank you for your report.
The issue has been fixed in #23650 by @gwharton in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.10 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Jul 15, 2019
@magento-engcom-team
Copy link
Contributor

Hi @ffauvel. Thank you for your report.
The issue has been fixed in #23649 by @gwharton in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.3 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Jul 18, 2019
@avoelkl
Copy link
Contributor

avoelkl commented Aug 27, 2019

For anyone having troubles with e-mails in Magento 2.3.2 as well:
We had the problem that the merchants' firewall blocked all magento mails as "line too long".

I added commit 226009e as hotfix to one of my projects but had to adjust the hotfix locally it as there were different changes to Message.php as well.

The issue was resolved applying the fix.
In fact, these 2 lines are important:
226009e#diff-134b78852b9ecf820540911b665d6566R170

lib/internal/Magento/Framework/Mail/Message.php:
$part->setEncoding(Mime::ENCODING_QUOTEDPRINTABLE);
$part->setDisposition(Mime::DISPOSITION_INLINE);

@a-dite
Copy link

a-dite commented Oct 18, 2019

After update to Magento 2.2.10 (from 2.2.9) in our customer project we faced the issue that diverse mails, also the order confirmation mail, on some Exchange servers, were displayed empty in Outlook and the content of the mail was in an attachment file like ATT00000011.htm. See description e.g. here. We fixed the issue by reverting the functional (not tests) part of the PR #23650 via patch. Actually removing these lines in lib/internal/Magento/Framework/Mail/Message.php

$part->setEncoding(Mime::ENCODING_QUOTEDPRINTABLE); $part->setDisposition(Mime::DISPOSITION_INLINE);

Let me know if i should open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Framework/Mail Component: Mail Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

5 participants