SSL operation failed with code 1

I am getting this error when sending email. I am using codeigniter

framework. Below is codeigniter

the default file file.

Severity level: warning

fwrite (): SSL operation failed with code 1. OpenSSL Error Messages: Error: 140D00CF: SSL Procedures: SSL_write: Protocol Disabled

Filename: libraries / Email.php

Line number: 1846

This was not the case before. This is my function to send email.

    $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();

      

+3


source to share





All Articles