使用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"; 设置为这个 请教这样的网址是怎么生成的? mysql存储过程 问一个关于fsockopen的问题,请前悲指教 这个爱购物网站程序是如何实现博客群的? 问卷调查,如何纪录答卷人的IP ? PHP中替换字符串中的<>然后在文本框中显示 大量图片文件存储的解决方案 Zen么样制作PHP帮助?就像php.net网站上的帮助那样? 怎么判断一个数组的维数? 求个正则的问题 统计了一下项目代码量……非常惊人~散分 无法获取页面内容
加第四个参数,$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);