我不明白发生了什么变化,我之前使用过这个smtp协议,一切正常。完美运行并向用户发送电子邮件,但是现在当我运行它时会出现某种错误。它有完全相同的笔记本电脑没有在我的服务器触摸。这有什么问题?
消息:fsockopen():SSL操作失败,代码为1. OpenSSL错误消息:错误:14090086:SSL例程:ssl3_get_server_certificate:证书验证失败
永久禁用我的avast,我清除了电子邮件端口。是否可以在openssl.cafile中没有值?
email.php
<?php
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'ssl://smtp.googlemail.com';
$config['smtp_port'] = '465';
$config['smtp_user'] = '*********';
$config['smtp_pass'] = '*********';
$config['mailtype'] = 'html';
$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE;
$config['dsn'] = TRUE;
$config['validate'] = TRUE;
$config['smtp_timeout'] = '30';
$config['newline'] = "\r\n"; //use double quotes to comply with RFC 822 standard
?>
控制器
$this->load->library('email');//path application/config/email.php
$this->email->set_newline("\r\n");
$this->email->attach($image);
$cid = $this->email->attachment_cid($image);
$message_right = '<img src="cid:'.$cid.'" alt="gfc-logo" style="width:30%;margin-left:30%;"/>';
$this->email->to($emailAdd);
$this->email->from('*********@gmail.com', 'KFC');
$this->email->subject('Resetting your gfc login password');
$this->email->message($message_header.$message_left.$message_right.$message_footer);
if ($this->email->send()) {
$this->session->set_flashdata('category_success', 'A link to reset your password has been sent to <a>"'."$emailAdd".'"</a>. If you dont see it, try to check on your spam forlder.');
}else{
$this->session->set_flashdata('category_error', 'Their is some problem sending <a>"'."$emailAdd".'"</a> to our SMTP_SERVER, Please try Again.');
show_error($this->email->print_debugger());exit;
}