使用PHP的mail函数发送中文邮件,客户端乱码,如何解决? 为什么?但是我的网页要使用gb2312或者utf8编码 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不管你用的什么编码,总得指明你发送的编码,客户端好读取.加第四个参数,$header,并在里面指明你发送的编码.以下是手册的.// To send HTML mail, the Content-type header must be set$headers = 'MIME-Version: 1.0' . "\r\n";$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";// Additional headers$headers .= 'To: Mary <[email protected]>, Kelly <[email protected]>' . "\r\n";$headers .= 'From: Birthday Reminder <[email protected]>' . "\r\n";$headers .= 'Cc: [email protected]' . "\r\n";$headers .= 'Bcc: [email protected]' . "\r\n";// Mail itmail($to, $subject, $message, $headers); To楼上我加上了那些header都不行,使用了utf8,但是接收到的邮件还是乱码 使用class.phpmailer.php类,将里面的 var $CharSet = "uft-8"; 设置为这个 ubuntu11.10如何配置SVN与WEB服务器同步 php下载图片 基础问题 PHP AJAX添加数据问题??急~~~ 源码看不懂,请教。谢谢! php如何调用mysql存储过程并获得记录集 作了几年开发,狠下心写了一个商务网站 一个关于页面跳转的问题 大家能不能给个phpbb的首页调用? apache+php问题 不知道是没有高手还是没给分的原因 至今没几人访问,也没能解决 统计了一下项目代码量……非常惊人~散分 无法获取页面内容
加第四个参数,$header,并在里面指明你发送的编码.以下是手册的.// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";// Additional headers
$headers .= 'To: Mary <[email protected]>, Kelly <[email protected]>' . "\r\n";
$headers .= 'From: Birthday Reminder <[email protected]>' . "\r\n";
$headers .= 'Cc: [email protected]' . "\r\n";
$headers .= 'Bcc: [email protected]' . "\r\n";// Mail it
mail($to, $subject, $message, $headers);