Description
Preconditions (*)
- Magento version 2.3.3 (worked fine previously on 2.3.2)
- Outlook 2010 behind MS Exchange 2010 (don't have later version accessible for immediate testing with this project), or Outlook Web Access, have also confirmed with Mail clients on Mac, iPhone and Android that pull mail from this Exchange server
- Issue does not appear to affect rendering from Gmail/etc - seems to only be clients that are connecting to MS Exchange 2010 to retrieve the message
Steps to reproduce (*)
- Submit an order, send order notification or send shipment notification
- Receive email using a client/server combination similar to above noted configuration (Outlook/Exchange)
Expected result (*)
- Receive an email with the body of the message containing the rendered template for the order notification email
Actual result (*)
- Receive an email with a blank body, and the content included as an ATT*-labeled attachment to the email
Notes
I understand that this Outlook/Exchange combination is fairly aged, but it's what I'm working with for at least the next couple of months.
I believe this is associated with the changes from #23643, putting the quoted-printable [back] into the emails.
From what I can determine, when a header is rendered, it's processed by a class implementing Zend\Mail\Header\HeaderInterface
. There is no class registered for the header "Content-Disposition", so it ends up getting rendered through the Zend\Mail\Header\GenericHeader
class. The getFieldValue()
method looks like this:
public function getFieldValue($format = HeaderInterface::FORMAT_RAW)
{
if (HeaderInterface::FORMAT_ENCODED === $format) {
return HeaderWrap::wrap($this->fieldValue, $this);
}
return $this->fieldValue;
}
When commenting out the if() block above, the email looks fine when it's received. What's happening is that the Content-Disposition is getting set to "inline", however when rendered it is being translated as quoted-printable and ends up with a value of =?utf-8?Q?inline?=
, instead of inline
. The MS Exchange 2010 involved appears to reject or not understand this disposition type and treats it as a generic attachment.
I don't believe that it's necessary/good to have the Content-Disposition header encoded like this. Maybe it is. I'm not completely familiar with the relevant RFCs and it's completely possible that this Exchange server is not handling it correctly. I will be attempting to find a workaround I can implement as a local plugin for now, but wanted to get this out in front of more experienced Magento developers in case the impact is greater than an old and just about out-of-support version of MS Exchange.
Thank you!
The 2.3.3 rollout has been working pretty well for us so far outside of this issue - all the hard work is much appreciated, you guys rock!
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done