We are using OpenCart Version 2.3.0.2, PHP 7 and we have recently (within the last week) started receiving 'Mail delivery failed: returning message to sender' when OpenCart sends replies to standard operations such as users filling out a Contact Form, Registering with the site or Requesting New Password etc.
We've spoken with our hosting provider who in turn put us in touch with their mail provider MailChannels, who have said that the emails being sent from our site are missing a valid Message ID in the header and this needs to be added to the PHP script sending the mail, otherwise going forward, almost all of the recipient mail servers will reject emails that don't have a message-id.
Nothing has changed on the site in a long time.
We are using SMTP and the DKIM and SPF Records have been added and checked by the hosting company and are correct.
Has anyone else started having these issues? Any thoughts or suggestions to resolve would be gratefully received.
And which header and which valid ID ??.. missing a valid Message ID in the header ..
Sounds to me that they not really know what's going on.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
I was having the same issue with OC2.3.0.2! Also with HostPapa and their bloody MailChannels.
I was able to come up with a solution to our problem. Add this to your vqmod/xml folder. It will add a message-id field to your message headers. The field was borrowed from a later version of OC.
Create a blank text file called 'message-id-fix.xml' and copy n'paste the following:
I was able to come up with a solution to our problem. Add this to your vqmod/xml folder. It will add a message-id field to your message headers. The field was borrowed from a later version of OC.
Create a blank text file called 'message-id-fix.xml' and copy n'paste the following:
Code: Select all
<modification>
<id>Message-ID Fix</id>
<version>1.0.0</version>
<vqmver>2.4.1</vqmver>
<author>Paul Pritsis</author>
<file path="system/library/mail.php">
<operation>
<search position="after"><![CDATA[$header .= 'From: =?UTF-8?B?' . base64_encode($this->sender) . '?= <' . $this->from . '>' . PHP_EOL;]]></search>
<add><![CDATA[$header .= 'Message-ID: <' . base_convert(microtime(), 10, 36) . '.' . base_convert(bin2hex(openssl_random_pseudo_bytes(8)), 16, 36) . substr($this->from, strrpos($this->from, '@')) . '>' . PHP_EOL;]]></add>
</operation>
</file>
</modification>
[code]
Who is online
Users browsing this forum: No registered users and 9 guests