【发布时间】:2017-04-13 08:20:49
【问题描述】:
当我启用 ssl_module 时,apache 总是不工作 如果我禁用 ssl_module
#LoadModule ssl_module modules/mod_ssl.so
我的 wampserver 将再次工作。
我尝试通过 localhost 和 CodeIgniter 使用 gmail 发送邮件,但出现此错误:
遇到了 PHP 错误
严重性:警告
消息:fsockopen():SSL 操作失败,代码为 1。OpenSSL 错误 消息:错误:14090086:SSL 例程:SSL3_GET_SERVER_CERTIFICATE:证书验证失败
文件名:libraries/Email.php
行号:2063
回溯:
文件:D:\wamp64\www\TracerStudy\application\controllers\regis.php 行:128 功能:发送
文件:D:\wamp64\www\TracerStudy\index.php 行:315 功能: 需要一次
-- 更新-- 我收到了这个错误:
严重性:警告
消息:fsockopen(): php_network_getaddresses: getaddrinfo failed: No such host is known.
我的代码:
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => 'mymail',
'smtp_pass' => 'mypassword',
'mailtype' => 'html',
'charset' => 'iso-8859-1',
'smtp_crypto' => 'ssl',
'wordwrap' => TRUE
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('myemail');
$this->email->to('sendemail');
$this->email->subject('subject');
$this->email->message('message');
if($this->email->send())
{
echo 'Email sent.';
}
else
{
show_error($this->email->print_debugger());
}
【问题讨论】:
标签: apache email module wampserver