Post by icestudios » Thu Feb 08, 2024 12:18 am

We are using OpenCart Version, 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.



Fri Feb 15, 2013 6:14 am

Post by OSWorX » Thu Feb 08, 2024 2:18 am

.. missing a valid Message ID in the header ..
And which header and which valid ID ??
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.

User avatar
Guru Member


Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by ADD Creative » Thu Feb 08, 2024 6:32 pm

This topic might be helpful.

Expert Member


Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by radact » Sat Jul 06, 2024 9:30 am

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:

Code: Select all

    <id>Message-ID Fix</id>
    <author>Paul Pritsis</author>

    <file path="system/library/mail.php">
            <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>

New member


Fri Nov 25, 2016 11:36 am
Who is online

Users browsing this forum: No registered users and 4 guests