SMTP error with CodeIgniter and gmail SMTP error with CodeIgniter and gmail codeigniter codeigniter

SMTP error with CodeIgniter and gmail


As @SamV points out in a comment, the problem is this lines on system/libraries/Email:

$ssl = ($this->smtp_crypto === 'ssl') ? 'ssl://' : '';$this->_smtp_connect = fsockopen($ssl.$this->smtp_host,                        $this->smtp_port,                        $errno,                        $errstr,                        $this->smtp_timeout);

If you remove the ssl:// from the smtp_host and you leave it as:

$config['smtp_host']='smtp.googlemail.com';

it will work.


Use this:

$config = Array(   'protocol' => 'smtp',   'smtp_host' => 'ssl://smtp.googlemail.com',   'smtp_port' => 465,   'smtp_user' => 'user', //without @gmail.com   'smtp_pass' => 'pass' );$this->load->library('email',$config);

Make sure you dont use the @gmail.com for smtp_user