Post by blizeH » Sun Jan 13, 2013 10:22 pm

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.

Image

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!
Last edited by blizeH on Mon Aug 12, 2013 2:53 am, edited 1 time in total.

New member

Posts

Joined
Sat Jan 14, 2012 4:20 am

Post by blizeH » Mon Jan 14, 2013 1:19 am

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 :(
Last edited by blizeH on Mon Aug 12, 2013 2:52 am, edited 1 time in total.

New member

Posts

Joined
Sat Jan 14, 2012 4:20 am

Post by blizeH » Mon Jan 14, 2013 1:55 am

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

New member

Posts

Joined
Sat Jan 14, 2012 4:20 am

Post by blizeH » Mon Jan 14, 2013 2:42 am

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?

New member

Posts

Joined
Sat Jan 14, 2012 4:20 am

Post by blizeH » Mon Jan 14, 2013 2:44 am

Is there anyway to grab the email in plain format?

New member

Posts

Joined
Sat Jan 14, 2012 4:20 am

Post by Daniel » Mon Jan 14, 2013 11:47 am

just echo the output.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Daniel » Mon Jan 14, 2013 11:52 am

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();

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by blizeH » Tue Jan 22, 2013 5:08 am

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 :)

New member

Posts

Joined
Sat Jan 14, 2012 4:20 am

Post by artebit » Sun Mar 03, 2013 10:56 pm

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...

Attachments

screen.png

screen.png (56.3 KiB) Viewed 12082 times


Newbie

Posts

Joined
Sun Mar 03, 2013 5:11 am

Post by kenty » Sat Mar 16, 2013 2:08 am

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

New member

Posts

Joined
Sat Mar 16, 2013 1:00 am

Post by theace » Sat Mar 23, 2013 6:42 pm

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.

New member

Posts

Joined
Sun Jun 17, 2012 2:17 am

Post by Phil_L » Sat Mar 23, 2013 8:37 pm

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.

Home Study and Online Courses | Breakwater Brewing Co.


New member

Posts

Joined
Thu May 31, 2012 12:23 am


Post by theace » Sun Mar 24, 2013 11:07 pm

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. :-\

New member

Posts

Joined
Sun Jun 17, 2012 2:17 am

Post by sharonob » Fri May 10, 2013 4:53 am

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!

New member

Posts

Joined
Mon Aug 15, 2011 3:45 am

Post by sharonob » Fri May 10, 2013 5:39 am

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 -

New member

Posts

Joined
Mon Aug 15, 2011 3:45 am

Post by sharonob » Sat May 11, 2013 2:25 am

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.

New member

Posts

Joined
Mon Aug 15, 2011 3:45 am

Post by peter-hnr » Sat Jun 15, 2013 12:25 am

Same problem here.. 1.5.5.1
Why dont the developer fix this problem???

New member

Posts

Joined
Wed Apr 04, 2012 6:56 am

Post by LourensN » Tue Jul 09, 2013 5:03 pm

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!

New member

Posts

Joined
Mon Oct 29, 2012 3:19 pm

Post by blizeH » Tue Jul 16, 2013 9:39 pm

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 :(

New member

Posts

Joined
Sat Jan 14, 2012 4:20 am

Post by orieszkowicz » Sat Nov 23, 2013 4:48 am

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.

Newbie

Posts

Joined
Sat Oct 15, 2011 2:18 am
Who is online

Users browsing this forum: Google [Bot] and 56 guests