我在opencart-> settings-> mail
中使用Mail功能但是当我在我的网站上下载演示订单时,我收到的电子邮件确认如下所示:
<My_Hosting_username@srv21.main-hosting.eu>; on behalf of; Domain <help@domain.com>
我尝试编辑mail.php(system / library / mail.php),如下所示:
这
$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;
要
$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: help@domain.com' . $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;
我仍然只收到上面的电子邮件。
<My_Hosting_username@srv21.main-hosting.eu>; on behalf of; Domain <help@domain.com>
任何人都可以提供帮助,因为这会向客户披露托管信息并产生隐私问题。
答案 0 :(得分:0)
当您使用邮件而不是smtp时会发生这种情况,因为邮件是一个开放的中继,并允许您设置From,因为您希望始终获得通过。所以一切都很好,如果您希望在电子邮件中没有这个,您应该在管理员后端的设置中使用SMTP。
简而言之:
转到系统 - &gt;设置
修改主网站
获取邮件标签
您应将SMTP指定为邮件协议
为以下各项指定正确的数据:SMTP主机,SMTP用户名,SMTP密码
你已经完成了。