Given the following php code:
<html>
<body>
<?php
$fname ="First Name = ".$_REQUEST['fname']."\n";
$lname ="Last Name = ".$_REQUEST['lname']."\n";
$breakfast = "Desired Breakfast = ".$_REQUEST['breakfast']."\n";
$floor ="Desired Floor = ".$_REQUEST['floor']."\n";
$to = "XXXX@gmail.com";
$email="XXXX@gmail.com";
$subject="shenkar php form from erez geva site";
$body =$fname.$lname.$breakfast.$floor;
if (mail($to, $subject, $body, "From: $email")){
header("Location: http://localhost:9090/sent.html");
exit();
}else{
echo("<p>Message delivery failed...</p>");
}
?>
</body>
</html>
Does not work. The Index HTML file which the user picks the desired options from is well written (accouring to me professor), so lets assume the problem is elsewhere. If I go directly to that php file : localhost\send.php I get this 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:\wamp\www\send.php on line 12
What is the meanning of it?