I have a issue when sending email to codeigniter.
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.gmail.com',
'smtp_port' => 465,
'smtp_user' => 'email@gmail.com',
'smtp_pass' => 'xxxxx',
'mailtype' => 'html',
'charset' => 'iso-8859-1'
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->to($user['company_email']);
$this->email->from('noreply@email.com', 'COMPANY');
$this->email->subject('Password reset');
$this->email->message('You have requested a code. Here is your code: '. $reset['return_pass']);
$this->email->send();
At some time, I can send email with no problem but if I use it multiple times or multiple user use this send email(for forgot password), googlemail is unable to connect to ssl://smtp.googlemail.com:465 (Connection timed out) and the email will not be received by the user. How can I fix this issue ? is this a security issue with googlemail?