Welcome Guest, Not a member yet? Register   Sign In
SMTP not working in CI 3.0 while same code is working in CI 2.*

This is a big issue i'm struggling with, the thing is our application needs to send email, now we are relying on smtp, until 2.*(latest) email worked fine, but as soon as we ported app in ci 3.0 everything worked by smtp, here is error we are getting on ci 3.0 sample email
   A PHP Error was encountered

   Severity: Warning

   Message: fwrite(): SSL operation failed with code 1. OpenSSL Error messages: error:140D00CF:SSL routines:SSL_write:protocol is shutdown

   Filename: libraries/Email.php

   Line Number: 2131

   Backtrace: has nothing, it is shown blank, used bold text to specify that
i wonder if anyone is facing this issue, would appreciate help on this one
PHP Code:
function sendEmail($to,$subject,$body,$from "My Company Name")
       $CI =& get_instance();
       $config['protocol'    'smtp';
       $config['smtp_host'   'ssl://smtp.zoho.com';
       $config['smtp_port'   '465';
       $config['smtp_timeout'] = '7';
       $config['smtp_user'   '[email protected]_domain.com';
       $config['smtp_pass'   'secret_password';
       $config['charset'     'utf-8';
       $config['newline'     "\r\n";
       $config['mailtype'    'html'// or html
       $config['validation'  TRUE// bool whether to validate email or not
       $CI->email->from('[email protected]_domain.com',$from);
           //return true;
           echo $CI->email->print_debugger();
           //return false;
           echo $CI->email->print_debugger();

Theme © iAndrew 2016 - Forum software by © MyBB