A
Anonymous
Guest
Hi. I am using Apache's localhost server, with PHP 5.02. I am trying out the e-mail option with the following simple code:
<?
$to = "dtvonly@yahoo.com";
$subject = "Hi";
$body = "Testing PHP e-mail";
if (mail($to, $subject, $body))
{
echo("<p>Message successfully sent!</p>");
}
else
{
echo("<p>Message delivery failed...</p>");
}
?>
...but got the following error:
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in c:\program files\apache group\Apache2\htdocs\daifiles\emailing.php on line 6
Message delivery failed...
I have no idea what to do. Someone please help? Thank you.
<?
$to = "dtvonly@yahoo.com";
$subject = "Hi";
$body = "Testing PHP e-mail";
if (mail($to, $subject, $body))
{
echo("<p>Message successfully sent!</p>");
}
else
{
echo("<p>Message delivery failed...</p>");
}
?>
...but got the following error:
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in c:\program files\apache group\Apache2\htdocs\daifiles\emailing.php on line 6
Message delivery failed...
I have no idea what to do. Someone please help? Thank you.