在codeigniter中使用SMTP的邮件内容错误 实际上,我的邮件与HTML
标签一起发送,它显示HTML
标签不正确。使用codeigniter发送html邮件
$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();
如果我不使用SMTP发送邮件,它工作正常。我的错误是什么?
我不认为'ssl://'是主机名的一部分。也许还有另一种设置打开SSL? – 2012-02-03 21:00:05
codeigniter完整的html电子邮件配置:http://stackoverflow.com/a/38740292/4376484 – Pran 2016-08-03 14:26:30