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("
");
$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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…