Page 1 of 2
Not receiving any emails (contact us or notifications)
Posted: Sun Jan 13, 2013 10:22 pm
by blizeH
Hi,
As far as I can tell, my mail settings are configured correctly but I'm not receiving any emails, not through the contact form, nor for new customers or any orders that are placed.
I've tried:
1) Changing to SMTP, I get an error and my host (IXWebHosting) says I need to disable Authorization within the application, and I cannot see an option to this... ideally it'd be sent via Mail anyway since I'm switching mail hosts soon
2) Adding -f and -F before the email as suggested here
http://forum.opencart.com/viewtopic.php ... 1&p=257231
3) Adding different emails to the 'also send to' box at the bottom of the Mail page
4) Manually defining the 'From' header in the code as suggested here
http://forum.opencart.com/viewtopic.php ... 0&p=281016
5) Tried @gmail.com, @googlemail.com and @domain.co.uk
And unfortunately I still don't receive any email from OpenCart
Any suggestions would be very welcome, thank you!
Re: Not receiving any emails (contact us or notifications)
Posted: Mon Jan 14, 2013 1:19 am
by blizeH
For what it's worth, I'm running Opencart version 1.5.4
Upon submitting the contact form, it says "Your enquiry has been successfully sent to the store owner!" but it doesn't actually send anything

Re: Not receiving any emails (contact us or notifications)
Posted: Mon Jan 14, 2013 1:55 am
by blizeH
I've just contacted my host:
As I can see php mail() function is working fine. Please provide your mail account. I will provide you with the test script to test php mail() function.
Sounds about right, I have other sites running on the same host and never had a problem with the mail function before - so does that mean it definitely is a problem with my OpenCart installation?
Thanks
Re: Not receiving any emails (contact us or notifications)
Posted: Mon Jan 14, 2013 2:42 am
by blizeH
This code:
Code: Select all
echo $header = 'From: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline;
die();
Outputs this:
From: =?UTF-8?B?Tmljaw==?=
I'm guessing that's part of the problem?
Re: Not receiving any emails (contact us or notifications)
Posted: Mon Jan 14, 2013 2:44 am
by blizeH
Is there anyway to grab the email in plain format?
Re: Not receiving any emails (contact us or notifications)
Posted: Mon Jan 14, 2013 11:47 am
by Daniel
just echo the output.
Re: Not receiving any emails (contact us or notifications)
Posted: Mon Jan 14, 2013 11:52 am
by Daniel
also try getting rid of this
echo $header = 'From: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline;
die();
change to
echo $header = 'From: ' . '$this->sender' . '<' . $this->from . '>' . $this->newline;
die();
Re: Not receiving any emails (contact us or notifications)
Posted: Tue Jan 22, 2013 5:08 am
by blizeH
Thanks Daniel, I had to change a few lines but eventually got it working:
Code: Select all
if ($this->protocol != 'mail') {
$header .= 'To: ' . $to . $this->newline;
$header .= 'Subject: ' . $this->subject . $this->newline;
}
$header .= 'From: ' . $this->from . $this->newline;
$header .= 'Reply-To: ' . $this->from . $this->newline;
$header .= 'Return-Path: ' . $this->from . $this->newline;
$message = $this->text;
mail($to, '=?UTF-8?B?' . base64_encode($this->subject) . '?=',$message, $header);
The main problem with this now is I get the following error message in Gmail:
This message may not have been sent by: <email>
Plus I can't insert logos etc of course because it's plain text... but the e-mails are sending now at least

Re: Not receiving any emails (contact us or notifications)
Posted: Sun Mar 03, 2013 10:56 pm
by artebit
I've posted here before about a similar problem...
I'm just reporting back what happened and how it was fixed.
Initially, in my personal case of course, an upgrade from OC 1.5.4.1 to 1.5.5.1 allegedly could have been the cause for the mail funtion disruption, but I was wrong. I came to that conclusion because no notification emails and contact forms were being received.
I have a standard shared hosting service and the emails are being managed by Gmail servers.
With the help of my hosting provider we figured that OC was indeed sending out emails but they were flagged as spam by google's servers.
If you have a similar problem check your spam box first.
SOLUTIONS
1- You can create filters in your email account to allow emails to be trusted from your domain.
2- Go to Opencart Admin > Settings > Mail. Choose Mail function and add your SMTP settings (similar to to the uploaded screenshot)
I hope this helps someone...
Re: Not receiving any emails (contact us or notifications)
Posted: Sat Mar 16, 2013 2:08 am
by kenty
Hi Folks, I am testing my new website before launch and having the same problems as mentioned here, it is doing my nut in now as I have spent so many hours messing about trying to resolve.
My web guy said it could be a host issue, Host papa say they don't support mail configuration and it will be program issue.
Playing devils advocate here, but how hard can it be for email notifications to be sent! This is supposedly progress....
Regards Keith
Re: Not receiving any emails (contact us or notifications)
Posted: Sat Mar 23, 2013 6:42 pm
by theace
artebit wrote:I've posted here before about a similar problem...
I'm just reporting back what happened and how it was fixed.
Initially, in my personal case of course, an upgrade from OC 1.5.4.1 to 1.5.5.1 allegedly could have been the cause for the mail funtion disruption, but I was wrong. I came to that conclusion because no notification emails and contact forms were being received.
I have a standard shared hosting service and the emails are being managed by Gmail servers.
With the help of my hosting provider we figured that OC was indeed sending out emails but they were flagged as spam by google's servers.
If you have a similar problem check your spam box first.
SOLUTIONS
1- You can create filters in your email account to allow emails to be trusted from your domain.
2- Go to Opencart Admin > Settings > Mail. Choose Mail function and add your SMTP settings (similar to to the uploaded screenshot)
I hope this helps someone...
I tried this. Didn't work.
Re: Not receiving any emails (contact us or notifications)
Posted: Sat Mar 23, 2013 8:37 pm
by Phil_L
Not happening here either:
situ:
1.5.4.1 with Html Mail template and Invoice and Pick list mods installed.
custom themed
nothing mailing - even running the test:
Code: Select all
<?php
$to = "myemail";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "main@siteIamworkingon.com";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>
it' reporting back as functioning... but I don't get any mail
now, my lay-tired brain is saying to me it's a PHP function/server issue?
anyhelp appreciated.
Re: Not receiving any emails (contact us or notifications)
Posted: Sun Mar 24, 2013 11:07 pm
by theace
It's getting really difficult to deal with this. The entire store is a mess. People aren't getting their order confirmation emails, account verification mails, password resets... NOTHING works. Could someone please find a solution? This is a fairly bothersome problem.

Re: Not receiving any emails (contact us or notifications)
Posted: Fri May 10, 2013 4:53 am
by sharonob
Hello!
Me too- just went from 1.5.1.3 to 1.5.5.1 I'm assuming this is some new encryption issue or ssl issue? The smtp settings are the same but no emails. Really need them!
Re: Not receiving any emails (contact us or notifications)
Posted: Fri May 10, 2013 5:39 am
by sharonob
Daniel,
in 1.5.5.1 - mail.php I don't see die() at all- I have:
if ($this->protocol != 'mail') {
$header .= 'To: ' . $to . $this->newline;
$header .= 'Subject: ' . $this->subject . $this->newline;
}
$header .= 'Date: ' . date('D, d M Y H:i:s O') . $this->newline;
$header .= 'From: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline;
I would like to correct this - should the die() be added or not? RIght now there are no emails sent after an order - BUT forgotten works -
Re: Not receiving any emails (contact us or notifications)
Posted: Sat May 11, 2013 2:25 am
by sharonob
Is there any new information on this? I've compared the 1.5.1.3 mail.php and it's very different from 1.5.5.1. I am having trouble explaining to my client that there will be no emails sent to clients upon their order and have no solution?
The forgotten email works so why wouldn't the order email? I've seen dozens of posts about this and no real explanation. I am not running a 3rd party extension here- no plugins. Just using the OC mail with authorize.net (that email is working).Also I don't see any difference in the form for mail in System Settings and It always worked before.
This is not a spam issue and we are set up for smtp.
Please any information would be appreciated.
Re: Not receiving any emails (contact us or notifications)
Posted: Sat Jun 15, 2013 12:25 am
by peter-hnr
Same problem here.. 1.5.5.1
Why dont the developer fix this problem???
Re: Not receiving any emails (contact us or notifications)
Posted: Tue Jul 09, 2013 5:03 pm
by LourensN
I have the same problem. I have not looked at the Mail option and tried every setting my ISP have given me to try for the SMTP option, without avail.
Thought it could possibly be a hosting platform / php thing, so have changed php to V5.3, but still not working.
There are a number of threads here with the same issue, but no conclusion to the problem.
Could someone in the know please offer some insight into this problem!
Re: Not receiving any emails (contact us or notifications)
Posted: Tue Jul 16, 2013 9:39 pm
by blizeH
The solution I posted above should work, the main problem is that it forces the emails to be plain text, rather than nice HTML ones.
I'm scared to update my store in case the emails break again

Re: Not receiving any emails (contact us or notifications)
Posted: Sat Nov 23, 2013 4:48 am
by orieszkowicz
Change the file:
system/library/mail.php | line 97
Remove second $this->newline from code.
From this:
$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;
Final look:
To this:
$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline;
It works just fine for me now.