Post by reynafabrics » Tue Jan 09, 2018 7:01 pm

Hi,
My site running on 2.0.3.1 version. I am having issue with email notification. I am not getting notification emails while sign up, order confirmation etc.
I have done general R&D like
1) Mail/SMTP configuration with and without -f parameters SMTP Port.
2) Checked for both Gmail account and personal domain account
3) Set email as registered email for sending mails via scripts (hostgator)
4) Added code sendmail_path = /usr/sbin/sendmail -t -i; in root and admin php.ini file

Then I changed,

$header .= 'From: =?UTF-8?B?' . base64_encode($this->sender) . '?=' . ' <' . $this->from . '>' . $this->newline;

from system/library/mail.php

//$header .= 'From: =?UTF-8?B?' . base64_encode($this->sender) . '?=' . ' <' . $this->from . '>' . $this->newline;
$header .= 'From: XXXXX@mydomain.com' . $this->newline;

It works!!

posted for reference only as I suffered a lot and I don't want for others.....

Newbie

Posts

Joined
Thu Sep 07, 2017 9:38 pm


Post by straightlight » Wed Jan 10, 2018 7:31 am

There is already an existing extension on the marketplace that resolves this issue without having to manually set your email. This problem is rather related with the base64 encoding for some hosts.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

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

Post by reynafabrics » Wed Jun 06, 2018 6:06 pm

straightlight wrote:
Wed Jan 10, 2018 7:31 am
There is already an existing extension on the marketplace that resolves this issue without having to manually set your email. This problem is rather related with the base64 encoding for some hosts.

I have just changed the following code at system/library/mail.php
It works for me and I hope it will helpful to someone.


Original:
$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;
$header .= 'Reply-To: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . ' <' . $this->from . '>' . $this->newline;
$header .= 'Return-Path: ' . $this->from . $this->newline;
$header .= 'X-Mailer: PHP/' . phpversion() . $this->newline;
$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;

Changed:
$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;
$header .= 'From: email@yourdomainname.com' . $this->newline;
if (!$this->reply_to) {
$header .= 'Reply-To: =?UTF-8?B?' . base64_encode($this->sender) . '?=' . ' <' . $this->from . '>' . $this->newline;
} else {
$header .= 'Reply-To: =?UTF-8?B?' . base64_encode($this->reply_to) . '?=' . ' <' . $this->from . '>' . $this->newline;
}
$header .= 'Return-Path: ' . $this->from . $this->newline;
$header .= 'X-Mailer: PHP/' . phpversion() . $this->newline;
$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;

Newbie

Posts

Joined
Thu Sep 07, 2017 9:38 pm

Who is online

Users browsing this forum: Gobbo, thekrotek and 47 guests