急~ PHP发邮件的标题(字符集)问题 可以使用变码,例如base64编码等 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这个是一个mime smtp类中的一个方法:function Buildhead($from_name,$to_name,$from_mail,$to_mail,$subject){ if (empty($from_name)) $from_name=$from_mail; if (empty($to_name)) $to_name=$to_mail; $this->subject = "From: =?$this->charset?B?".base64_encode($from_name)."?=<$from_mail>\r\n"; $this->subject .= "To: =?$this->charset?B?".base64_encode($to_name)."?=<$to_mail>\r\n"; $subject=ereg_replace("\n","",$subject); $this->subject.="Subject: =?$this->charset?B?".base64_encode($subject)."?=\r\n"; if ($this->debug) echo nl2br(htmlspecialchars($this->subject)); return true;} 注意$this->subject.="Subject: =?$this->charset?B?".base64_encode($subject)."?=\r\n";这一行,这一行使用了在前面指定的编码,然后把标题的正文用base64编码。 谢谢,我要好好研究一下我没用过mime smtp来发过邮件我都是直接用mail(... 的方法去发,是不是也用同样的方法就可以了 php foreach嵌套循环 输出键值 这个这则表达式是什么意思 字符串的分割问题 如何截取指定长度汉字而不会出现以"?>"结尾,超出部分以"..."代替 这段存储过程如何添加到MYSQL里啊 PHP 连接access ,但是ACCESS是中文字段怎么查询? 一个PHP网页中文出现乱码问题,急需帮助 刚开始.... 招聘程序员 新手问题! 这个问题怎么解决? 为什么我用Dreamweaver无法预览我做的PHP页面?
function Buildhead($from_name,$to_name,$from_mail,$to_mail,$subject)
{
if (empty($from_name)) $from_name=$from_mail;
if (empty($to_name)) $to_name=$to_mail;
$this->subject = "From: =?$this->charset?B?".base64_encode($from_name)."?=<$from_mail>\r\n";
$this->subject .= "To: =?$this->charset?B?".base64_encode($to_name)."?=<$to_mail>\r\n";
$subject=ereg_replace("\n","",$subject);
$this->subject.="Subject: =?$this->charset?B?".base64_encode($subject)."?=\r\n";
if ($this->debug) echo nl2br(htmlspecialchars($this->subject));
return true;
}
$this->subject.="Subject: =?$this->charset?B?".base64_encode($subject)."?=\r\n";
这一行,
这一行使用了在前面指定的编码,
然后把标题的正文用base64编码。