This is the error i get when i try to use the mail function...
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:\xampp\htdocs\results.php on line 36
And this is my php code... I can't find out whats wrong, so i am hoping you can help me! 😃
<?php
/* Form processing code variables */
$name = $_POST['name'];
$email = $_POST['email'];
$favweb = $_POST['favweb'];
$comments = $_POST['comments'];
$emailsubject = 'PHP email form';
$emailaddress = 'themasterplaya13@gmail.com';
$body = "Name: {$name} <br> Email: {$email} <br> Favourite Website: {$favweb} <br> Comments: <br> {$comments} <br>";
$headers = "From: $email\r\n";
$headerinfo .= "Content-type: text/html\r\n";
$success = mail($emailaddress, $emailsubject, $body, $headers, $headerinfo);
?>
<?php
echo "Name: {$name} <br><br> E-Mail: {$email} <br><br> Favourite Website: {$favweb} <br><br> Comments: <br><br> {$comments}";
?>
Please help, i would really like to fix this. 😃