OpenCart:电子邮件工作,但从:(关闭)错误


OpenCart: Emails are working but wrong from: (CLOSED)

我正在使用openart ->设置->邮件中的邮件功能

但是当我在我的网站上放置演示订单时,我收到电子邮件确认如下,来自地址:

<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>

谁能帮忙,因为这会向客户泄露托管信息,并产生隐私问题。

当您使用邮件而不是smtp时,就会发生这种情况,因为邮件是一个开放的中继,并且允许您按照希望的方式设置发件人。所以一切都很好,如果你不想在你的电子邮件中有这个,你应该在管理后端设置中使用SMTP。

简而言之:

进入系统->设置

编辑你的主站

get to Mail选项卡

您应该指定SMTP作为邮件协议

指定正确的数据:SMTP主机,SMTP用户名,SMTP密码