【发布时间】:2012-02-02 17:52:53
【问题描述】:
我看到很多其他人都有这个问题。
我已经使用 Google Mail 服务器设置了一个电子邮件表单来发送电子邮件。这在我的本地机器上工作,但是一旦我把它放在服务器上,我就会收到这个错误
The following SMTP error was encountered: 110 Connection timed out
Unable to send data: AUTH LOGIN
Failed to send AUTH LOGIN command. Error:
Unable to send data: MAIL FROM:
from:
The following SMTP error was encountered:
Unable to send data: RCPT TO:
to:
The following SMTP error was encountered:
Unable to send data: DATA
data:
The following SMTP error was encountered:
Unable to send data: User-Agent: CodeIgniter Date: Thu, 2 Feb 2012 14:24:43 +0000
这是我在 CI 中的设置
$config = array (
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_user' => 'emial',
'smtp_pass' => 'password',
'smtp_port' => '465',
'protocol' => 'smtp',
'charset' => 'utf-8',
'mailtype' => 'html',
'wordwrap' => TRUE
);
我尝试过同时使用 port465 和 587,以及 ssl://smtp.googlemail.com 和 tls://smtp.googlemail.com
任何帮助让这个工作会很棒。
【问题讨论】:
-
您可能想尝试解决方案posted here。
-
谢谢,但这就是我所拥有的,我没有 fsockopen 问题,它可能与端口有关。
-
我不确定这有多重要,但我注意到
charset不同。 -
嗨科林,如果我删除“html”,它似乎只会发送文本。不知道为什么,但它有效......
标签: codeigniter smtp gmail