维斯 苏 wrote:
This is the first time I use mail() in php to send email,but failed,my
program is
<?
$message="abcdefghijklmnopqrstuvwxyz";
$a=mail("afcn0@xxxxxxxxxxxx <mailto:afcn0@xxxxxxxxxxxx>", "没有主题",
$message, "From: Mailer:PHP/");
if ($a)
echo "ok";
else
echo "fail";
?>
on fc4 it show ok,but i didn't recieve any emails,
Look in the mail server's log files to see what happened to the mail.
If there is nothing in the mail server log file relating to this mail,
the mail may never have been sent - are you using SELinux?
and on win xp sp2 i also failed it tellme "*Warning*: mail(): SMTP
server response: 550 5.7.1 Unable to relay for afcn0@xxxxxxxxxxxx in
*d:\usr\www\html\aaa1.php* on line *4*
The SMTP server you are trying to use is configured not to relay mail
from your Windows XP machine.
Paul.