答案 0 :(得分:1)
我找到了答案。
您必须从此网址https://www.google.com/settings/security/lesssecureapps转换不太安全的应用以获取gmail
答案 1 :(得分:0)
在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
答案 2 :(得分:0)
尝试此方法。 转到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;
}
建议备份文件。