我正在尝试发送一封带有代码点火器的简单电子邮件:
$email_config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => 'xxx',
'smtp_pass' => 'xxx'
);
$this->load->library('email', $email_config);
$this->email->from('no-reply@mysite.com', 'Admin');
$this->email->to($email_address);
$this->email->subject('Test Subject');
$this->email->message('Test Message');
$this->email->send();
但它只是超时。我在 php.ini 中取消了注释的扩展名=php_openssl.dll,但我猜还有其他一些设置问题。我正在 IIS7 上运行。
您是否尝试过检查服务器的传出互联网连接以确保一切正常?另外,我也会检查防火墙设置。
对我来说,这看起来不像是 CI 或 PHP 问题,我通过 gmail 发送的配置看起来就是这样,所以你们都很好。