CodeIgniter Forums
[split] Email problem with 3.1.2 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: [split] Email problem with 3.1.2 (/showthread.php?tid=69600)



[split] Email problem with 3.1.2 - gk007 - 12-20-2017

Hi guys,
I'm working on CodeIgniter 3.1.2, everything is going to be okay but, I'm facing the problem with using email library system.
When I'm trying to send an email then my script is displaying the error like "fsockopen(): unable to connect to ssl://smtp.googlemail.com:465 (Connection timed out)".

my code is -
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => '[email protected]',
'smtp_pass' => 'xxxxxxxxxx',
'mailtype' => 'html',
'charset' => 'iso-8859-1'
);
$this->load->library('email');
$this->email->initialize($config);
$this->email->set_newline("\r\n");
$this->email->from('[email protected]','xxxxxxxxxx');
$this->email->to('[email protected]');
$this->email->subject('Confirmation Email');
$this->email->message($message);

$mail = $this->email->send();