cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.3.3 Invalid header detected

Highlighted

Magento 2.3.3 Invalid header detected

Hi guys,

after upgrade to 2.3.3 i got error when trying send email with Ææ Øø Åå Ææ Øø Åå characters. the error is invalid header


4 REPLIES 4
Highlighted

Re: Magento 2.3.3 Invalid header detected

Hello @5d19c60a6d1cc  

 

Yes, after upgrade we are facing same error but you can solve it using chose below two option.

 

1. Install SMTP Module and configure it.

2. Please find the php module which is missing in your php version. actually i don't remember about the module name but yes i am sure there should be missing php module. also if you use php 7.2 or 7.3 then please change the version from php 7.3 or 7.2 to 7.1. it should work

 

Thank you

Anant P

Highlighted

Re: Magento 2.3.3 Invalid header detected

Hi

Did you find a solution?

Highlighted

Re: Magento 2.3.3 Invalid header detected

Hello @lars_hoej 

 

Can you please send me your error. so, I can help you

 

Thank you

Anant P

Highlighted

Re: Magento 2.3.3 Invalid header detected

This solution worked for me 🎉 !
In the EmailMessage class vendor/magento/framework/Mail/EmailMessage.php the encoding can be set if passed in an argument in the constructor, but it is null by default.

if ($encoding) {
    $this->message->setEncoding($encoding);
}

So, I think the best practice use type in di.xml in your module without rewrite and plugins.

 

<type name="Magento\Framework\Mail\EmailMessage">
    <arguments>
        <argument name="encoding" xsi:type="string">utf-8</argument>
    </arguments>
</type>


Reference here.