【发布时间】:2015-10-08 05:49:39
【问题描述】:
我在通过 SMTP 访问 1and1 电子邮件时遇到问题,他们在他们的网站上声明应将以下信息用于 SMTP
Outgoing (SMTP) Server smtp.1and1.com
Outgoing port with TLS enabled 587
Outgoing server requires authentication? Yes
但是,当我在 codeigniter 的电子邮件配置文件中使用它时,我从以下配置中没有得到任何结果:
$config['protocol'] = "smtp";
$config['smtp_host'] = "smtp.1and1.com";
$config['smtp_port'] = "587";
$config['smtp_user'] = "noreply@domain.com";
$config['smtp_pass'] = "noreply";
$config['smtp_crypto'] = 'tls';
$config['charset'] = 'utf-8';
$config['mailtype'] = 'html';
$config['wordwrap'] = TRUE;
$config['crlf'] = '\r\n';
$config['newline'] = '\r\n';
此外,电子邮件调试函数返回:
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.
【问题讨论】:
-
codeigniter 似乎有问题,TLS 方面需要更多工作,我最终使用了github.com/ivantcholakov/codeigniter-phpmailer
标签: php codeigniter email