可以使用变码,例如base64编码等

解决方案 »

  1.   

    这个是一个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;
    }  
      

  2.   

    注意
    $this->subject.="Subject:  =?$this->charset?B?".base64_encode($subject)."?=\r\n";
    这一行,
    这一行使用了在前面指定的编码,
    然后把标题的正文用base64编码。
      

  3.   

    谢谢,我要好好研究一下我没用过mime smtp来发过邮件我都是直接用mail(... 的方法去发,是不是也用同样的方法就可以了