|
$config['protocol']="smtp";
$config['smtp_host']="smtp.163.com";
$config['smtp_user']="xxx@163.com";
$config['smtp_pass']="xxx";
$config['crlf']="\r\n";
$config['newline']="\r\n";
$config['mailtype']="html";
$config['smtp_port'] = 25;
$config['charset'] = 'utf-8';
$config['wordwrap'] = TRUE;
$this->load->library("email");
$this->email->initialize($config);
$from_name="站主";
$subject="感谢你对xxx网站的支持";
$message="我们会尽快处理你提出的问题!";
$from_name=iconv("UTF-8","GB2312",$from_name);
$subject=iconv("UTF-8","GB2312",$subject);
$message=iconv("UTF-8","GB2312",$message);
//发送邮件
$this->email->from("xxxx@163.com",$from_name);
$this->email->to($email);
$this->email->subject($subject);
$this->email->message($message);
$this->email->send();
为什么还是乱码?
|
|