发送电子邮件时收到此错误消息。我正在使用codeigniter
框架。
以下文件是codeigniter
默认文件。
严重性:警告
fwrite():SSL操作失败,代码为1. OpenSSL错误消息:错误:140D00CF:SSL例程:SSL_write:协议已关闭
文件名:libraries / Email.php
行号:1846
以前不是这样的。这是我的发送电子邮件功能。
$ci = get_instance();
$ci->load->library('email');
$config['protocol'] = "smtp";
$config['smtp_host'] = SMTP_HOST;
$config['smtp_port'] = "465";
$config['smtp_user'] = SMTP_USER;
$config['smtp_pass'] = SMTP_PASSWORD;
$config['charset'] = "utf-8";
$config['mailtype'] = "html";
$config['newline'] = "\r\n";
$ci->email->clear(TRUE);
$ci->email->initialize($config);
$ci->email->from(SMTP_USER, 'something');
$ci->email->to(array($email));
$this->email->reply_to(SMTP_USER, 'Customer Reply');
$ci->email->subject($subject);
$ci->email->message($message);
if($attachment!=''){
$ci->email->attach($attachment);
}
$ci->email->send();