【发布时间】:2011-10-21 15:04:13
【问题描述】:
我正在尝试通过 SMTP 在托管在 1and1 上的 codeigniter 网站上发送电子邮件。当我在本地执行此操作时效果很好,但是当我从我的 1and1 主机尝试时,我得到一个错误。
这是我的配置:
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'auth.smtp.1and1.fr'; //i'm in france and this is the SMTP server adress 1and1 gave me.
$config['smtp_port'] = 25;
$config['smtp_user'] = 'user@mydomain.com';
$config['smtp_pass'] = 'password';
这是错误:
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: //details about my message i removed
Unable to send data: .
The following SMTP error was encountered:
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
然后我尝试使用 smtp.1and1.com 而不是 auth.smtp.1and1.fr。令人惊讶的是它有效,但执行需要 30 秒! (在我的本地主机上它是瞬时的)。
有什么建议吗?
【问题讨论】:
标签: email codeigniter smtp shared-hosting