mail("欧琼 <[email protected]>","请注意接收","sdfdsfdsfdsf","From: [email protected]\nContent-Type:text/html;charset=gb2312;\n");

解决方案 »

  1.   

    Mistruster(弱智d) 请注意发了,最后一句能加,但是发不出去了。
    不加可以发出,但是电子邮件地址是服务器的地址,我不能指定了,请问有没有其它的解决方法可以解决这个问题。谢谢。200分相送。
      

  2.   

    什么邮件系统?是不是禁止了外来域邮件?
    找个email的类发发试试.
      

  3.   

    <?php
    ///推荐使用PEAR/MAIL类
    require_once('Mail.php');
    function sendPaswd($email,$msg)
    {

    $recipients = trim($email);
    //$headers['To']      = $email;
    $headers['From']    = '[email protected]';
    $headers['Subject'] = 'Subject';
    $body = "--------------------Subject------------------------<br>";
    $body .= "   ".$msg." ";

    $param["host"]="22.152.33.113"; - //The server to connect. 
    $param["port"]=25; - //The port to connect. Default is 25 
    $param["auth"]= 1; - //Whether or not to use SMTP authentication. Default is FALSE 
    $param["username"]="[email protected]"; //- The username to use for SMTP authentication. 
    $param["password"]="123456"; //- The password to use for SMTP authentication
    // Create the mail object using the Mail::factory method
    $mail_object =& Mail::factory('smtp', $param);
    if($mail_object->send($recipients, $headers, $body))
    {

    return true;
    }
    else return false;
    }//like this try it
    //Mail.php download url: http://pear.php.net/package/Mail
    ?>
      

  4.   

    如果使用的是Qmail + vpopmail
    在安装vpopmail时加上参数:
    ./configure --enable-default-domain=ghry.com
      

  5.   

    linux下不做什么设置,在租用的空间上,mail()函数可以直接用吗,怎么用?
    如果要设置,做哪些工作?
      

  6.   

    租用的空间上,它肯定是设置好的了,
    如果它装了MailServer应该就可以用了。