Hi guys
No doubt there is a simple solution to this, but i cant get my form to email the details properly. The code is as follows:
<?php
@extract($_POST);
$fn = stripslashes($fname);
$sn = stripslashes($sname);
$comp = stripslashes($company);
$a1 = stripslashes($address1);
$a2 = stripslashes($address2);
$twn = stripslashes($town);
$cty = stripslashes($county);
$num = stripslashes($number);
$em = stripslashes($email);
$cmd = stripslashes($contactmethod);
$coursedate = stripslashes($date);
$coursename = stripslashes($course);
$todayis = date("l, F j, Y, g:i a") ;
$to = "
[email protected]";
$subject = "Open Course Enquiry";
$from = "From: $em\r\n";
$body = "Blah blah.";
if (mail($to, $subject, $body, $from))
{
echo("<h1>Open Courses</h1>
<p>Thank you for registering an interest in this course.</p>
<p>Your details have been taken and one of our representatives will be in touch shortly.</p>");
} else {
echo("<p>Message delivery failed.</p>");
}
?>
If anyone can see why this wouldnt send an email please reply. It doesnt give an error message, it says the email has been sent, but ive never recieved anything
Cheers in advance