【发布时间】:2020-07-31 19:50:33
【问题描述】:
我厌倦了 Godaddy 以及他们缺乏让我的电子邮件正常工作的知识或解决方案。所以也许stackoverflow上的某个人有解决这个问题的办法。
我无法让我的电子邮件在具有安全 ssl 连接的 codeigniter 中工作。
不安全的解决方案有效
$config['email_config'] = [
'email_address' => 'no-reply@domain.com',
'owner' => 'Owner',
'email_owner' => 'no-reply@domain.com',
'charset' => 'utf-8',
'mailtype' => 'html',
'protocol' => 'smtp',
'smtp_host' => 'mail.domain.com',
'smtp_port' => '587', // 465, 25, 587
'smtp_timeout' => '7',
'smtp_user' => 'no-reply@domain.com',
'smtp_pass' => 'xxx',
'validation' => TRUE,
];
但我似乎无法通过 ssl 连接电子邮件。
$config['email_config'] = [
'email_address' => 'no-reply@domain.com',
'owner' => 'Owner',
'email_owner' => 'no-reply@domain.com',
'charset' => 'utf-8',
'mailtype' => 'html',
'protocol' => 'smtp',
'smtp_host' => 'domain.com',
'smtp_crypto' => 'ssl',
'smtp_port' => '465', // 465, 25, 587
'smtp_timeout' => '7',
'smtp_user' => 'no-reply@domain.com',
'smtp_pass' => 'xxx',
'validation' => TRUE,
];
详细信息在我的 cpanel 的邮件中提供
- 安全 SSL/TLS 设置(推荐)
- 用户名:no-reply@domain.com
- 密码:使用电子邮件帐户的密码。
- 接收服务器:domain.com
- IMAP 端口:993 POP3 端口:995
- 发送服务器:domain.com
- SMTP 端口:465
- IMAP、POP3 和 SMTP 需要身份验证。
【问题讨论】:
标签: php email ssl codeigniter-3