Hi All
I've got he following script which is meant to send me an email from the online form...
It redirects users to the thanks url properly but i never get the email...
Any ideas?
- Code: Select all
<?php
// Configuration Settings
$SendFrom = "Form Feedback <plymouth-kolts@blueyonder.co.uk>";
$SendTo = "Jonathan Garnett-Smith <plymouth-kolts@blueyonder.co.uk>";
$SubjectLine = "Players Player";
$ThanksURL = "http://devoted.to/kolts";
//confirmation page
$Divider = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
// Build Message Body from Web Form Input
$MsgBody = @gethostbyaddr($REMOTE_ADDR) . "\n$Divider\n";
foreach ($_POST as $Field=>$Value)
$MsgBody .= "$Field: $Value\n";
$MsgBody .= $Divider . "\n" . $HTTP_USER_AGENT . "\n";
$MsgBody = htmlspecialchars($MsgBody); //make content safe
// Send E-Mail and Direct Browser to Confirmation Page
mail($SendTo, $SubjectLine, $MsgBody, "From: " . $SendFrom);
header("Location: $ThanksURL");
?>