public function sendemail() { //header("Content-Type: text/html; charset=utf-8");
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'smtp.163.com';
$config['smtp_user'] = '0537wangjin@163.com';
$config['smtp_pass'] = '************';
$config['charset'] = 'utf-8';
$config['wordwrap'] = TRUE;
$config['mailtype'] = 'html';
$this -> load -> library('email');
$this->email->initialize($config);
$this->email->from('0537wangjin@163.com');
$this->email->to('wj@chinaemail.com.cn');
$this->email->subject('用CI的mail类发送邮件!');
$this->email->message('用CI的mail类发送邮件 测试没有问题正常发送');
if( ! $this->email->send()){
echo '发送失败!';
}else{
echo '发送成功!';
}
}