public function index()
{
//$this->load->view('welcome_message');
$config = Array(
'protocol'=> 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => '********@gmail.com',
'smtp_pass' => '********'
);
$this->load->library('email',$config);
$this->email->set_newline("\r\n");
$this->email->from('*******@gmail.com','kvr');
$this->email->to('******@gmail.com');
$this->email->subject('test mail');
$this->email->message('working');
$path = $this->config->item('server_root');
//echo $path;
//die();
if($this->email->send())
{
echo 'mail sent';
}
else
{
show_error($this->email->print_debugger());
}
}
I got error
*********
1,
Message: fsockopen(): SSL: Handshake timed out
2,Message: fsockopen(): Failed to enable crypto
3,Message: fsockopen(): unable to connect to ssl://smtp.googlemail.com:465 (Unknown error)
4,
The following SMTP error was encountered: 110 Connection timed out
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
guys help me to solve my problem