I have setup a basic php and html form on my local virtualhost(apache). When I click submit button I get 2 errors:
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:\operator1\on-infosol\primary\contact\form.php on line 6
Warning: Cannot modify header information - headers already sent by (output started at C:\operator1\on-infosol\primary\contact\form.php:6) in C:\operator1\on-infosol\primary\contact\form.php on line 7
This is the html code.
<form action="form.php" method="POST">
<table>
<tr>
<td>Name:</td>
<td><input type="text" name="name"></td>
</tr>
<tr>
<td>Email:</td>
<td><input type="text" name="email"></td>
</tr>
<tr>
<td>Message:</td>
<td><textarea name="mesg"></textarea></td>
</tr>
<tr>
<td><input type="submit" name="SubmitForm" value="Send"></td>
</tr>
</table>
</form>
and this is php code inside form.php:
<?php
$email = $REQUEST['email'] ;
$message = $REQUEST['message'] ;
mail( "myaccount@hotmail.com", "Feedback Form Results",
$message, "From: $email" );
header( "Location: http://www.example.com/thankyou.html" );
?>
Do I need to install some kind of program to send mail from on my local apache server? Or is a standard apache installation capable of doing so.... how?