Odoo 10: Mail Delivery Failed (error: 111)

Odoo 10: Mail Delivery Failed (error: 111)

我正在尝试从我的 Odoo 10 安装中发送电子邮件。为此,我使用 Gmail SMTP 配置了外发邮件服务器,如下所示:

SMTP Server: smtp.gmail.com
SMTP Port: 465
Priority: 10
Connection Security: SSL/TLS

我还配置了我的 Gmail 帐户以接受来自外部的安全性较低的连接,当我 运行 从 Odoo 的电子邮件配置菜单进行测试时,我收到以下消息:

Connection Test Succeeded! Everything seems properly set up!

但是:如果我尝试使用 Odoo 发送真实邮件,我会收到以下错误原因:

Mail Delivery Failed
Mail delivery failed via SMTP server 'localhost'.
error: 111
Connection refused

我不知道怎么办,我在网上搜索过,但没有找到。希望有人能帮助我。非常感谢。

从错误中可以清楚地看出 Odoo 正在尝试使用“SMTP 服务器 'localhost'”发送电子邮件。

默认情况下,Odoo 将在外发邮件配置菜单中创建一个本地主机服务器。所以你必须在表单中设置 "Priority" 字段。将 GMail 服务器优先级设置为“1"and localhost as "2” 或任何其他值。

Priority: The priority of your mail server. The lower the number the higher the priority. This will mean that the e-mail server with the lowest number will be used the most.