Post by Emmynet » Mon Oct 14, 2013 2:56 am

Daniel wrote:a lot of problems regard mails not set out are to do with the line endings

you can try altering the mail class so that

public $crlf = "\r\n";


public $crlf = "\n";
@Daniel, it's the "send" button in mail system that is not working/responding



Mon Oct 14, 2013 2:52 am

Post by carriecaz » Tue Nov 05, 2013 11:04 am

Hi there, I am having the same issue and am using 1.5.6. I have tried the fixes listed both under the contact.tpl file and the mail.php file and none of them work for me, I still get the error message Email message required when trying to send emails to my customer groups.

Contact us and order notification are all working fine, so just seems to be the sales/mail system that isn't working, can anyone offer advice on what I can do to fix this in 1.5.6? Thanks Please note, I am computer literate, but not very clued up on html etc, so plain English and basic instructions required. Cheers



Wed Sep 25, 2013 5:58 pm

Post by ramjiweb » Wed Apr 30, 2014 9:16 pm


Go to catalog\language\english\mail\order.php

check the strings which are modified by you , check any special characters in that strings,,,




Tue Apr 15, 2014 2:16 pm
Location - Coimbatore

Post by seraght » Mon May 05, 2014 9:34 am

Hi, Daniel

I have the same problem and try to look many old topic. but that not resolve my problem.
After I read many topic from you. That because smtp setting is not match for the opencart, right?
That's mean I must get information from the webhosting to setting my opencart to work perfectly.

Could you help me what information I must ask Webhosting to config opencart. or create new topic about "how to config mail.php to work properly on your host" to stop this endless problem.

I quite newbie for programming but I will try to understand it.




Mon May 05, 2014 9:27 am

Post by shree935 » Wed May 07, 2014 7:46 pm

testATtest wrote:I tested several versions of OC last "full" working compilation is, all subsequent versions (updated by the /install/) do not work... testing & testing.... but I'm so blind, and your tip was very helpful !!! issue is resolved. Thx!

scrap of mail.php - 1.5.5

Code: Select all

108-		$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;
120-		$message .= 'Content-Transfer-Encoding: 8bit' . $this->newline . $this->newline;
changed to scrap of mail.php -

Code: Select all

108-		$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline;
120-		$message .= 'Content-Transfer-Encoding: 8bit' . $this->newline;
Did this and many other solutions on the net.
No emails whatsoever from the cart. Any suggestions??



Wed May 07, 2014 1:27 am

Post by Daniel » Fri May 09, 2014 1:03 am

it works fine for 1000's of others.

Project Owner & Developer.

User avatar


Fri Nov 03, 2006 6:57 pm

Post by davidm1fcf » Sun May 11, 2014 4:28 am


I've been working on a new installation all day today, and seem to be up against a similar problem to others in this thread.

Scratch that - have sorted the problem out. Looking forward to playing with this some more.



Sun May 11, 2014 4:20 am

Post by tmitch2008 » Tue Jun 24, 2014 3:51 am


Sorry to comment on an old post. But this post is the closes i've found to the issue on my OpenCart site. Basically, all functionality which involves an email being sent from the server is not working on my website.

This has previously worked, then started having intermittent issues, and now i get constant problems. The issue...

Any function that requires an email being sent from the site is making the website go to a blank white page and then giving the following error in the admin error logs:

PHP Notice: Error: MAIL FROM not accepted from server! in /home/content/65/11980265/html/system/library/mail.php on line 290

Litrally my error logs in the admin site is full of the same error every day! It means that registering for an account, creating an order as a new customer (registering for an account), Contact Us all arn't working at all. Also if a user checksout as a guess then no confirmation emails are sent to the customer or me the admin to say an order has been placed.

I would really appreciate some help on this as it is starting to cost me customers. Thank you anyone in advance who can offer some help and support. My website is if you would like to try registering for an account or using the contact us to see the issue happening.




Wed Jun 12, 2013 10:51 pm

Post by deeve007 » Thu Oct 09, 2014 5:21 am

Daniel wrote:it works fine for 1000's of others.
That doesn't really offer a solution. A quick Google shows this error is quite common (of those who have posted, how many simply gave up and moved to another CMS?).

The issue arises due to the many hosts who, due to spam issues, do not allow emails to be sent from the server that are "from" an email address that does not exist on that server. Hence the contact form will not work, nor will mail.php.

This is certainly a common enough problem that it should have been addressed. Wordpress doesn't have a similar issue.

Anyway, if anyone can offer a solution that would be appreciated, will probably need to change some code in mail.php so any emails are sent from the site's admin address. If someone can point out where I should edit this it would be appreciated.


Zava Design | Naked Chronicles

New member


Mon Sep 27, 2010 8:05 pm

Post by cs378 » Mon Jan 26, 2015 12:09 am

I had this issue come up with my setup. I had read all over the opencart forum and after doing some test, it seems to me that it is NOT opencart's code that's wrong but the server side.

Changing SMTP to MAIL was not a solution due to DKIM verification. SMTP was a must as we don't want our mails to be marked as SPAM.

I am using OpenCart 2.0
To deeper diagnose the issue, I had to add in a bit of code to mail.php to print the REAL error message from SMTP.
Therefore modifying
trigger_error('Error: RCPT TO not accepted from server!:'.$reply);

My REAL error was: "550 5.1.1 : recipient address rejected: user unknown in local recipient table"

Turns out that I had misconfigured the postfix setting on my sever.

openned up the from postfix and changed the settings to for
mydomain =
mydestination = $myhostname, localhost, localhost.$mydomain, localhost.localdomain
#disabled the user local recipient table lookup
local_recipient_maps =

I am no expert on postfix but it worked for my situation.



Fri Apr 29, 2011 6:18 am

Post by damodaranudas » Wed Jul 29, 2015 12:37 am

The same issue here on OC
Edit: I didn't saw the alerts notification switch has changed to settings>option tab. Before it was at settings>mail then I was trying to figure out with my hosting provider unsuccessfully, now its working flawless. ;D

User avatar


Tue Nov 20, 2012 1:20 am
Location - Colombia

Post by jalgerjr » Wed May 18, 2016 5:46 pm

I found this thread after searching for a resolution to bouncing email sent to any email account and thought I'd post my resolution even though this thread seems to be split between two different issues. Hopefully others looking for a resolution to sending mail to Yahoo email accounts will find this information.

The bouncing email contains the following message:

host[] said: 554
Message not allowed - Headers are not RFC compliant[291] (in reply to end
of DATA command)

Here's what I did that fixed the problem and now mail is accepted by email addresses.

I made all the changes suggested in this thread to the following file: system/library/mail.php

1. I changed these two lines to remove the second $this->newline so now my code looks like this:

108- $header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline;
120- $message .= 'Content-Transfer-Encoding: 8bit' . $this->newline;

2. I changed $crlf to the following:
17- public $crlf = "\n";

After this did not work, I tried this suggestion found at this website: ... pliant291/

3. I commented out the Subject lines as follows:
89- //$header .= 'Subject: ' . $this->subject . $this->newline;
93- //$header .= 'Subject: ' . $this->subject . $this->newline;

Email now works when a customer signs up with a email account. I have also tested with and it is also working. No other testing has been done but will update if I find any errors.



Fri Dec 05, 2014 9:26 am
Who is online

Users browsing this forum: Majestic-12 [Bot] and 12 guests