需要SMTP的支持
    你可以在网上找到原代码 

解决方案 »

  1.   

    sf.net下载phpmailer类库简单好用$mail = new PHPMailer();
    $mail->CharSet = "utf-8";
    $mail->From = "[email protected]";
    $mail->FromName = "test";
    ...
    看例子
      

  2.   


    $headers="From:[email protected]\r\n";
    $headers.="Reply-To:[email protected]\r\n";
    $headers.="Content-type: text/plain;\r\n charset=iso-8859-1\r\n";
    mail("[email protected]","this is a 标题","这是文本内容",$headers);
    echo "文件执行"
      

  3.   


    按楼主的意思 ,mail() 应为 4 个参数,你怎么只写了3个,定义了一大堆,没有使用啊
      

  4.   

    用的是php函数的话,直接在php.ini里配置,
      

  5.   

    $headers="From:[email protected]\r\n";
    $headers.="Reply-To:[email protected]\r\n";
    $headers.="Content-type: text/plain;\r\n charset=iso-8859-1\r\n";
    mail("[email protected]","this is a 标题","这是文本内容");你没把定义的$headers传进mail()应该是mail("[email protected]","this is a 标题","这是文本内容", $headers);