Simple PHP Mail ·
Sep 29, 2009 Here's a simple php mail you can use for your site.Add this to you page with your form. Notice the send_contact.php page.
<form action="send_contact.php" method="post" >
Name:<br />
<input name="iFirstName" type="text" id="fn" size="50"><br /><br />
Email:<br />
<input name="iEmail" type="text" id="em" size="50"><br /><br />
Phone<br />
<input name="iPhone" type="text" id="ph" size="50"><br /><br />
Comments:<br />
<textarea name="iComments" cols="48" rows="4" id="co"></textarea><br /><br />
<input type="submit" name="Submit" value="Submit"> <input type="reset" name="Submit2" value="Reset">
</form>
Add this to the php page that sends the email:
<?php
$fn = $_POST["iFirstName"];
$em = $_POST["iEmail"];
$ph = $_POST["iPhone"];
$co = $_POST["iComments"];
echo "Thank you for your comments. We will get back to you soon." ;
$message = "First Name: ".$fn."\r\n\r\nHome Phone: ".$ph."\r\n\r\nEmail: ".$em."\r\n\r\nComments: ".$co;
$headers = 'From: flygirl2@bellsouth.net' . "\r\n" .
'cc: ' . "\r\n" .
'Reply-To: flygirl2@bellsouth' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail("flygirl2@bellsouth.net","Email from Ute Site",$message,$headers);
?>
— Zeus ::)