$email是传过来的
$subject="Naigo test";
$txt="sth.";
$headers="From:Naigo";
mail($email,$subject,$txt,$headers);
没报错也没发出去也没报错,试了好多邮箱都不行,网管说配好了……因为是刚毕业的刚工作不敢问,看别人贴说有返回值,怎么接啊?$res=mail($email,$subject,$txt,$headers);然后echo $res;没东西。
$subject="Naigo test";
$txt="sth.";
$headers="From:Naigo";
mail($email,$subject,$txt,$headers);
没报错也没发出去也没报错,试了好多邮箱都不行,网管说配好了……因为是刚毕业的刚工作不敢问,看别人贴说有返回值,怎么接啊?$res=mail($email,$subject,$txt,$headers);然后echo $res;没东西。
本地要在php.ini配置中发送email的参数.
; For Win32 only.
SMTP = localhost
smtp_port = 25; For Win32 only.
;sendmail_from = [email protected]; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.看到没有sendmail_path unix only
unix 是操作系统,
不一样的.你可以设置下sendmail的文件路径就可以了.