你用什么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"发送失败";
要发带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"发送失败";
直接可以用吗?
如:
[mail function]
SMTP=public.sta.net.cn ;Win32 Only
在WIN32下用MAIL函数是发不出去的。
不过除了SMTP之外还有许多方法。