contact for wont send

ok im working on a company website i used a flash template every thing works fine but the contact form. it guess its not php5 heres the code could you tell me if its correct or what i need to do to fix it

<?php $contact_name = $_POST['name']; $contact_email = $_POST['email']; $contact_subject = $_POST['subject']; $contact_message = $_POST['message']; if( $contact_name == true ) { $sender = $contact_email; $receiver = "[email protected]"; $client_ip = $_SERVER['REMOTE_ADDR']; $email_body = "Name: $contact_name \nEmail: $sender \n\nSubject: $contact_subject \n\nMessage: \n\n$contact_message \n\nIP: $client_ip \n\nThank You!"; $extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion(); if( mail( $receiver, "Flash Contact Form - $contact_subject", $email_body, $extra ) ) { echo "success=yes"; } else { echo "success=no"; } ?>

thats my send email php heres my auto response

<?php $contact_name = $_POST['name']; $contact_email = $_POST['email']; $contact_subject = $_POST['subject']; $contact_message = $_POST['message']; if( $contact_name == true ) { $sender = $contact_email; $receiver = "[email protected]"; $client_ip = $_SERVER['REMOTE_ADDR']; $email_body = "Name: $contact_name \nEmail: $sender \n\nSubject: $contact_subject \n\nMessage: \n\n$contact_message \n\nIP: $client_ip \n\nThanks!"; $email_body_auto_reply = "Hello $contact_name, \nThis is the auto reply message. Thank you. \n\nAdmin"; $extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion(); $extra_auto_reply = "From: $receiver\r\n" . "Reply-To: $receiver \r\n" . "X-Mailer: PHP/" . phpversion(); mail( $sender, "Auto Reply - Re: $contact_subject", $email_body_auto_reply, $extra_auto_reply ); // auto reply mail to sender if( mail( $receiver, "Flash Contact Form - $contact_subject", $email_body, $extra ) ) { echo "success=yes"; } else { echo "success=no"; } } ?>

www.alistguttering.com/index12.html to check what it looks like that.
my thing is it wont send the email and when you click send it jumbles the sent message or failed etc . if you could help youd be a life saver

I tried it out and I’m not getting an auto response.

[php]<?php
$contact_name = $_POST[‘name’];
$contact_email = $_POST[‘email’];
$contact_subject = $_POST[‘subject’];
$contact_message = $_POST[‘message’];

if( $contact_name == true )
{
$sender = $contact_email;
$receiver = "[email protected]";
$client_ip = $_SERVER[‘REMOTE_ADDR’];
$email_body = ‘Name: ‘.$contact_name.’ \nEmail: ‘.$sender.’ \n\nSubject: ‘.$contact_subject.’ \n\nMessage: \n\n’.$contact_message.’ \n\nIP: ‘.$client_ip.’ \n\nThank You!’;
$extra = ‘From: ‘.$sender.’\r\n Reply-To: ‘.$sender.’ \r\n X-Mailer: PHP/’ . phpversion();

if( mail( $receiver, 'Flash Contact Form - '.$contact_subject, $email_body, $extra ) )
{
echo “success=yes”;
}
else
{
echo “success=no”;
}
?>[/php]

[php]<?php
$contact_name = $_POST[‘name’];
$contact_email = $_POST[‘email’];
$contact_subject = $_POST[‘subject’];
$contact_message = $_POST[‘message’];

if( $contact_name == true )
{
$sender = $contact_email;
$receiver = "[email protected]";
$client_ip = $_SERVER[‘REMOTE_ADDR’];

$email_body = ‘Name: ‘.$contact_name.’ \nEmail: ‘.$sender.’ \n\nSubject: ‘.$contact_subject.’ \n\nMessage: \n\n’.$contact_message.’ \n\nIP: ‘.$client_ip.’ \n\nThanks!’;
$email_body_auto_reply = ‘Hello ‘.$contact_name.’, \nThis is the auto reply message. Thank you. \n\nAdmin’;

$extra = ‘From: ‘.$sender.’\r\n’ . ‘Reply-To: ‘.$sender.’ \r\n’ . ‘X-Mailer: PHP/’ . phpversion();
$extra_auto_reply = ‘From: ‘.$receiver’.\r\n’ . ‘Reply-To: ‘.$receiver.’ \r\n’ . ‘X-Mailer: PHP/’ . phpversion();

mail( $sender, ‘Auto Reply - Re: ‘.$contact_subject.’, ‘.$email_body_auto_reply.’, ‘.$extra_auto_reply.’’ ); // auto reply mail to sender

if( mail( $receiver, 'Flash Contact Form - '.$contact_subject, $email_body, $extra ) )
{
echo “success=yes”;
}
else
{
echo “success=no”;
}
}
?>[/php]

Check flash is working correctly and sending the information through.

Sponsor our Newsletter | Privacy Policy | Terms of Service