Magento – Magento 2.3.3 blank email with html attachment

emailmagento2.3.3order-confirmation-email

Since upgrade 2.3.2 to 2.3.3 order confirmation emails are showing empty with attachement.html file attached. The attachement.html files shows the order confirmation text which previously appeared in the message. When email with attachment is sent the message text appears in the email. We have already applied the backward compatibility patch. I assume it is a setting somewhere? Any help is much appreciated.

Best Answer

I've found the solution.

github.com/magento/magento2/issues/25076

You have to patch the following file:

vendor/zendframework/zend-mail/src/Headers.php

$current = $headers;
-        $current->setEncoding($encoding); // Delete this line under $current = $headers;
+        // PATCH
+        //$current->setEncoding($encoding);
+        $current->setEncoding($key === 'contentdisposition' && $current->getFieldValue(false) === 'inline' ? 'ASCII' : $encoding);
+        // ~PATCH
         $this->headers[$index] = $current;
         return $current;
     }
Related Topic