Opencart确认电子邮件

Opencart确认电子邮件,opencart,Opencart,我没有收到opencart版本2.1.0.1的确认 下面给出了“设置”中“邮件”选项卡的图像 有人能帮我吗 在Gmail和Opencart中使用SMTP设置时,请使用以下设置: - Mail Protocol : SMTP - Mail Parameters : (blank) - SMTP Host : ssl://smtp.gmail.com - SMTP Username : <youremail>@gmail.com - SMTP Password : &l

我没有收到opencart版本2.1.0.1的确认

下面给出了“设置”中“邮件”选项卡的图像


有人能帮我吗

在Gmail和Opencart中使用SMTP设置时,请使用以下设置:

 - Mail Protocol : SMTP
 - Mail Parameters : (blank) 
 - SMTP Host : ssl://smtp.gmail.com 
 - SMTP Username : <youremail>@gmail.com  
 - SMTP Password : <your password>
 - SMTP Port : 465
 - SMTP Timeout : 5

我找到了答案

你必须从这个url为gmail打开不太安全的应用程序,试试这个方法。 转到public_html/system/library/mail.php 查找此代码:

$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 .= 'From: =?UTF-8?B?' . base64_encode($this->sender) . '?=' . ' <' . $this->from . '>' . $this->newline;
$header .= 'From: emil@youremailid.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 .= '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 .= 'From: =?UTF-8?B?' . base64_encode($this->sender) . '?=' . ' <' . $this->from . '>' . $this->newline;
$header .= 'From: emil@youremailid.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;
}
建议对文件进行备份