mail($to, $subject, $message, "MIME-Version: 1.0\nContent-type: text/html;charset=gb2312");重点就是Content-type:text/html

解决方案 »

  1.   

    $to     = ****;
    $eurl   = $_POST['eurl'];
    $ebody  = $_POST['ebody'];
    $yemail = $_POST['yemail'];/* subject */
    $subject = "投诉";
    /* message */
    $message  = "URL地址:" . $eurl . "\n";
    $message .= "说明:" . $ebody;$headera  = "From:" . $yemail . "\n";
    $headera .= "Reply-To:" . $yemail . "\n";
    $headera .= "MIME-Version: 1.0\n";
    $headera .= "X-Priority: 3\n";
    $headera .= "X-MSMail-Priority: Normal\n";
    $headera .= "Content-Type: text/plain;\n";
    $headera .= "\tcharset=\"gb2312\"\n";
    /* and now mail it */
    mail($to, $subject, $message, $headera);这是我程序中的一段,可在$message中加入更多的内容。