邮件乱码
$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();
为什么还是乱码?
邮件大多数应该是 UTF-8 的吧。 Hex 发表于 2014-12-31 10:05
邮件大多数应该是 UTF-8 的吧。
能否告诉我如何修改??
可以试试看我的这个帖子
http://codeigniter.org.cn/forums/forum.php?mod=viewthread&tid=19856
页:
[1]