Error in mail content using SMTP in codeigniter
Actually, my mail is sent with HTML
tags and it is showing the HTML
tags which is not correct.
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => '[email protected]',
'smtp_pass' => '',
'mailtype' => 'html',
'charset' => 'utf-8',
'wordwrap' => TRUE
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$email_body ="<div>hello world</div>";
$this->email->from('[email protected]', 'ddd');
$list = array('[email protected]');
$this->email->to($list);
$this->email->subject('Testing Email');
$this->email->message($email_body);
$this->email->send();
echo $this->email->print_debugger();
If am sending mail without using SMTP it works fine. What is my mistake?
ssl://
is part of a host name. Maybe there's another setting to turn on SSL? – Condiment