This is my code:
$config = array(
'protocol' => 'smtps',
'smtp_host' => 'ssl://smtps.googlemail.com',
'smtp_user' => 'donotreply@eezybee.com',
'smtp_pass' => '******',
'smtp_port' => '465',
'mailtype' => 'html',
'smtp_timeout' => '4',
'newline' => "
"
);
$this->email->initialize($config);
$this->email->to('donotreply@eezybee.com');
$this->email->cc();//$this->input->post('cctxt')
$this->email->from('donotreply@eezybee.com');
$this->email->subject('Test subject');
$this->email->message('Test message');
$this->email->send();
echo $this->email->print_debugger();
This email is going into spam box.
First, you have an error in the google's SMTP SERVER, it must look like
$config = array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.gmail.com',
'smtp_user' => 'donotreply@eezybee.com',
'smtp_pass' => '******',
'smtp_port' => '465',
'mailtype' => 'html',
'smtp_timeout' => '4',
'newline' => "
"
);
$this->email->initialize($config);
$this->email->to('donotreply@eezybee.com');
$this->email->cc();//$this->input->post('cctxt')
$this->email->from('donotreply@eezybee.com');
$this->email->subject('Test subject');
$this->email->message('Test message');
$this->email->send();
echo $this->email->print_debugger();
Then, for this to work you must enable access for less secure apps in your google account, since you are not using OAUTH.
Enable access For less Secure Apps
Good Luck!