毛呢美甲图片:PHP发送邮件的编码问题

来源:百度文库 编辑:高校问答 时间:2024/05/06 12:00:46
我用PHP里的MAIL函数发送邮件到公司的Domino,在客户端一切都能正常显示,但用WEB端就会显示乱码,需要右键修改编码为GB2312才能正常显示,请问如何解决?谢谢!

加上
header("Content-type:text/html;charset=gb2312");

web端页面默认编码是什么啊?你就用web端的编码编写php文件。

try it

Please note followings:

<?php
$mh=imap_open("{localhost/pop:3110}INBOX"'$user,$pass)
or die("cannot open IMAP stream");
$body=imap_8bit(imap_body($mh,$msg_num));

imap_close($mh) or die("cannot close IMAP stream");
?>

you would add the function your page,you must install the IMAP class of php as precondition.Good luck!!!