你用什么mail函数吗??
要发带html格式的吗??$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=GB2312\r\n";//html格式
$headers .="Content-Transfer-Encoding;7bit\n";
$headers .= "From: [email protected]\r\n";
---------------------------------------------
若文本格式不需上面的代码
直接  mail($email,$subject,$message)
------------------------------------
if(mail($email,$subject,$message,$headers))
  echo"发送成功";
 else
   echo"发送失败";

解决方案 »

  1.   

    用mail函数在php里是不是需要设置什么??
    直接可以用吗?
      

  2.   

    PHP在UNIX/LINUX下发邮件用的是SENDMAIL程序,在WINDOWS没有SENDMAIL,但可以用SMTP协议来完成,具体方法如下:修改PHP.INI文件的[mail function]下的SMTP。 
    如: 
    [mail function] 
    SMTP=public.sta.net.cn ;Win32 Only
      

  3.   

    http://www.phpe.net/articles/225.shtml
      

  4.   

    blueoxygen(有你在身旁 心更坚强) ( ) 说的没错。
    在WIN32下用MAIL函数是发不出去的。
    不过除了SMTP之外还有许多方法。