【发布时间】:2014-01-23 08:13:49
【问题描述】:
我使用以下 smtp 信息配置了 CodeIgniter Ion Auth:
$config['use_ci_email'] = FALSE;
$config['email_config'] = array(
'mailtype' => 'html',
'protocol' => 'smtp',
'smtp_host' => 'mail.example.com',
'smtp_user' => 'support@example.com', // actual values different
'smtp_pass' => 'password',
'smtp_port' => '26'
);
当我注册一个帐户时,Ion Auth 只是说“已发送激活电子邮件”,但我的收件箱中什么也看不到(也检查了垃圾邮件文件夹)。我用 SMTP 测试工具检查了信息,$config['email_config'] 提供的 SMTP 信息是正确的。我遵循了 Ion Auth 文档,但没有收到任何电子邮件。还有什么需要做的吗?谢谢!
【问题讨论】:
-
将
$config['use_ci_email']设置为 TRUE 并配置 CodeIgniter 的 Email 类就可以了。 -
你必须在本地主机上检查它。除非配置,否则电子邮件不会在 localhost 上发送
-
@raheelshan 这到底是什么意思? :)
-
@RobertGrant install this 它会起作用。
-
你是说如果你指向本地主机发送邮件并且本地主机上没有邮件服务器,它就不会工作吗?如果是这样,为什么要特别指定 localhost,因为这适用于任何主机名。您最初的意思是:“检查服务器上是否有邮件服务器以及您指向的端口。”
标签: php codeigniter email smtp ion-auth