Post by Rainforest » Sat Jan 01, 2022 7:56 am

I am running an opencart 3.0.3.8 store. I just upgraded from 2.3.0.2
When a customer places an order the admin gets two emails. The admin copy and what looks like the email that is supposed to go the customer.

The customer does not get the order confirmation email.

I checked my events table and I've got what looks like most of the events. Checked the events DB and I have about 60 entries (including the mail events and activity)

I checked my SMTP settings and those are fine (google shows activity)

My other mail functions work:
1. notify of order history change
2. contact page
3. Forgotten password email works

Seems the only mail thing not working is the order confirmation email to customers.

Any idas?

Self Taught Opencart User & Developer Since 2010.


User avatar
Active Member

Posts

Joined
Fri Jan 28, 2011 3:50 am

Post by riwalker » Sun Jan 02, 2022 8:20 am

I also performed a fresh 3.0.3.8 today on Ubuntu 18.04 with Webmin.
Using mail (not SMTP), on forgot password, the store account receives the email, not the user !

I since just performed a test purchase, and the owner get the email, plus any other notified admin party, but not the customer!
so its a problem in general with sending any email (password reset or order), they all go to the owner
help??
Rob.

Newbie

Posts

Joined
Thu Nov 23, 2017 9:46 pm

Post by fegdeed » Mon Jan 03, 2022 12:22 am

Are you using the default theme or a custom theme?

Image
Get a secure, fast, and reliable web hosting service from https://turnuphosting.com/opencart-hosting/.


Active Member

Posts

Joined
Fri Sep 21, 2018 12:01 am

Post by by mona » Mon Jan 03, 2022 12:55 am

I do not see any issue with the mail address in that version, it is taken from the order itself.
So, first check the email address in the order itself.
if that is wrong, you have an issue with order creation.

if that is correct, check where the email is actually going by adding:

Code: Select all

error_log('sending email '.$this->subject.' to: '.$to);
after:

Code: Select all

	public function send() {
		if (is_array($this->to)) {
			$to = implode(',', $this->to);
		} else {
			$to = $this->to;
		}

in system/library/mail/smtp.php (if you use smtp)
or in system/library/mail/mail.php (if you use php mail)

Then you can check in your php error log (not the OC one) where the emails are going.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by ADD Creative » Mon Jan 03, 2022 12:56 am

Rainforest wrote:
Sat Jan 01, 2022 7:56 am
I am running an opencart 3.0.3.8 store. I just upgraded from 2.3.0.2
When a customer places an order the admin gets two emails. The admin copy and what looks like the email that is supposed to go the customer.

The customer does not get the order confirmation email.

I checked my events table and I've got what looks like most of the events. Checked the events DB and I have about 60 entries (including the mail events and activity)

I checked my SMTP settings and those are fine (google shows activity)

My other mail functions work:
1. notify of order history change
2. contact page
3. Forgotten password email works

Seems the only mail thing not working is the order confirmation email to customers.

Any idas?
Try using an online email deliverability checker such as https://www.mail-tester.com/.

www.add-creative.co.uk


Guru Member

Posts

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

Post by straightlight » Mon Jan 03, 2022 8:01 am

riwalker wrote:
Sun Jan 02, 2022 8:20 am
I also performed a fresh 3.0.3.8 today on Ubuntu 18.04 with Webmin.
Using mail (not SMTP), on forgot password, the store account receives the email, not the user !

I since just performed a test purchase, and the owner get the email, plus any other notified admin party, but not the customer!
so its a problem in general with sending any email (password reset or order), they all go to the owner
help??
Rob.
It is possible that your host might be using SMTP authentication to send the emails outside your domain. See with SMTP settings rather than mail if the reported issue can be reproduced.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by riwalker » Tue Jan 04, 2022 2:39 am

Thanks all. Its working - no problem with 3.0.3.8. the issue was yahoo and gmail
I ran a tail -f /var/log/mail.log, i saw:
"550-5.7.26 Unauthenticated email from yahoo.com is not accepted due to domain's 550-5.7.26 DMARC policy. Please contact the administrator of yahoo.com domain 550-5.7.26"
so used the Yahoo Complaint Feedback Loop (CFL) form to register our domain with yahoo to make it legitimate
https://io.help.yahoo.com/contact/index ... email-icon.

Newbie

Posts

Joined
Thu Nov 23, 2017 9:46 pm

Post by phpscript » Thu Apr 07, 2022 2:17 pm

i think base64_encode issue
replace to line
system/library/mail/mail.php

$message .= 'Content-Transfer-Encoding: base64' . PHP_EOL . PHP_EOL;
$message .= base64_encode($this->html) . PHP_EOL;

replace to
$message .= 'Content-Transfer-Encoding: 8bit' . PHP_EOL . PHP_EOL;
$message .= $this->html . PHP_EOL;

Newbie

Posts

Joined
Fri Sep 18, 2015 12:04 am

Post by ADD Creative » Thu Apr 07, 2022 5:06 pm

The issue might not be the base64_encode, but that the lines are too long.

The base64_encode output should be split into smaller lines. See.
https://github.com/opencart/opencart/pull/10269

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot], pprmkr and 39 guests