OpenCart - 不发送电子邮件(通知或联系页面) [英] OpenCart - not sending emails (notifications or contact page)

查看:1779
本文介绍了OpenCart - 不发送电子邮件(通知或联系页面)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,我的邮件设置配置正确,但我没有收到任何电子邮件,而不是通过联系表,新客户或任何订单。

As far as I can tell, my mail settings are configured correctly but I'm not receiving any emails, not through the contact form, nor for new customers or any orders that are placed.

以下是我当前的设置:

我试过:


  1. 更改为SMTP,我收到错误,我的主机(IXWebHosting)说我需要
    在应用程序中禁用授权,我不能
    看到这个选项

  1. Changing to SMTP, I get an error and my host (IXWebHosting) says I need to disable Authorization within the application, and I cannot see an option to this

在电子邮件之前添加-f和-F作为建议在这里

Adding -f and -F before the email as suggested here

将不同的电子邮件添加到$ b底部的还发送到框$ b邮件页面

Adding different emails to the 'also send to' box at the bottom of the Mail page

在代码中手动定义From标题为建议在这里

Manually defining the 'From' header in the code as suggested here

尝试@ gmail.com,@ googlemail.com和@arabel .co.uk

Tried @gmail.com, @googlemail.com and @arabel.co.uk

不幸的是,我仍然没有收到OpenCart的任何电子邮件。我已经联系了我的主机并运行测试脚本 - 服务器上的邮件功能或设置没有问题,我刚从OpenCart下载了最新版本的mail.php(虽然这是六个月大,我正在使用的那个)

And unfortunately I still don't receive any email from OpenCart. I've contacted my host and run test scripts - there isn't a problem with the mail function or setup on the server, and I've just downloaded the latest version of mail.php from OpenCart (although this is six months old and the one I was using anyway)

感谢

更新:

UPDATE:

看起来像base64_encode不起作用,因为这段代码:

It looks like base64_encode isn't working, because this code:

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

输出:


From:=?UTF-8?B?Tmljaw ==?=

From: =?UTF-8?B?Tmljaw==?=


推荐答案

p>不完全确定为什么基地64编码是诚实的。打开 system / library / mail.php 并更改此行

Not totally sure why the base 64 encode is there to be honest. Open system/library/mail.php and change this line

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

$header .= 'From: ' . $this->sender . ' <' . $this->from . '>' . $this->newline;

这篇关于OpenCart - 不发送电子邮件(通知或联系页面)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆