$config = array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.gmail.com',
'smtp_port' => '465',
'smtp_user' => "[email protected]",
'smtp_pass' => "xxxxxxx", // change it to yours
'mailtype' => 'html',
'charset' => 'utf8'
);
$this->load->library('email',$config);
$this->email->set_newline("
");
$this->email->set_crlf( "
" );
$this->email->from($config['smtp_user']);
$this->email->to($email['user_email']);
$this->email->subject($row['tplsubject']);
$this->email->message(html_entity_decode($email_subject));
$this->email->send();
This code not working its showing error
A PHP Error was encountered
Severity: Warning
Message: fsockopen(): unable to connect to ssl://smtp.gmail.com:465
(Unable to find the socket transport "ssl" - did you forget to enable
it when you configured PHP?)
Filename: libraries/Email.php
Line Number: 1689
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…