simple e-mail PHP form

I have an e-mail form on the flash website I am developing but I am not receiving any e-mails from it here is the code from my PHP script:


$name_text = $_GET[‘name_text’];
$email_text = $_GET[‘email_text’];
$subject_text = $_GET[‘subject_text’];
$message_text = $_GET[‘message_text’];
//$subject_text = $_GET[‘subject_text’];
//$urgent = $_GET[‘urgent_var’];

// next 3 lines, cleans up the comment text in case you don’t want line breaks. Probably isn’t neccessary here, so I’m commenting it out. Worth noting though that line breaks can come through.
// $comment_text = strip_tags($comment_text);
// $comment_text = str_replace(“r”, " ", $comment_text);
// $comment_text = str_replace(“n”, " ", $comment_text);

if ($email_text != NULL){ //
$from = $email_text ;
$headers = “From: $from”;
$email_to = ‘[email protected]’;
$subject = $subject_text ;
$message = "Name: " . $name_text . “n”;
$message .= "Email: " . $email_text . “nn”;
$message .= "Subject: " . $subject_text . “nn”;
$message .= “Message: n” . $message_text . “nn”;

mail($email_to , $subject , $message, $headers ); // sends an email
echo 'var1=yes&successMessage=message sent';



Is there anything wrong with this code? I have used a test script provided by my hosting company and I receive the test e-mail just fine. This script returns the echo to my flash file saying that the message has been sent successfully but the e-mail never turns up in my inbox! Please not my e-mail address has been substituted for a dummy in this instance.

Any help would be much appreciated!

Sponsor our Newsletter | Privacy Policy | Terms of Service