Codeigniter not sending email with smtp settings

Wednesday, November 4, 2015

I have the email.php in config folder:



$config = Array(
'protocol' => 'tls',
'smtp_host' => 'mail.lifepro.ro',
'smtp_port' => 465,
'smtp_user' => 'office@lifepro.ro',
'smtp_pass' => 'xxxxxxxxxxxx',
'mailtype' => 'html',
'charset' => 'utf-8',
'wordwrap' => TRUE
);


and this function in helper



    function email_send($to, $subject, $body) {

$ci = get_instance();
$ci->email->from('office@lifepro.ro', 'Office LifePro');
$ci->email->to($to);
$ci->email->cc('office@lifepro.ro');

$ci->email->subject($subject);
$ci->email->message($body);

if($ci->email->send())
return true;
}


The problem is that the CI is sending the email even if I type wrong credentials. Why is happening this? I know email.php from config folder is loaded automatically.

0 comments:

Post a Comment