Problems with php contact form

Hey all,

I am trying to get down to the bottom of my problem with a contact form I’m using for a client. My code is as follows:

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

if( $contact_name == true )
{
$sender = $contact_email;
//Put your email below
$receiver = "info@valleyhomemovies.com";

$email_body = "Name: $contact_name 

Email: $sender

Subject: $contact_subject

Message:

$contact_message";
$extra = "From: $sender
" . "Reply-To: $sender
" . “X-Mailer: PHP/” . phpversion();

if( mail( $receiver, "valleyhomemovies.com Contact Form - $contact_subject", $email_body, $extra ) ) 
{
	echo "success=yes";
}
else
{
	echo "success=no";
}

}
?>

The issue I’m having is that when I hit the submit button on my form, it doesn’t send the information through. It just stays stuck on sending… and doesn’t send any information. I then ran a test with an even simpler code:

<?php
mail(‘info@valleyhomemovies.com’,‘Test mail’,‘The mail function is working!’);
echo ‘Mail sent!’;
?>

Just to see if it was even connecting and I recieved this error:

Warning: mail() [function.mail]: Failed to connect to mailserver at “127.0.0.1” port 25, verify your “SMTP” and “smtp_port” setting in php.ini or use ini_set() in D:\hosting\member\shield\vhm\mailtest.php on line 2

Now I don’t have access to the host server because I’m not the owner. I just designed the site for the client and I have been having these issues with the form. I did test it on my server and everything worked fine which led me to believe that the problem lies in the php settings of their host server. I contacted the host server and this is what they sent me:

*"Dear client, 127.0.0.1 is localhost which you cannot use to send email. Please make use of your mail server to and send and provide SMTP authentication to the remote server. Note that the FROM address has to be the same as login email.

You can find sample mail scripts at http://webhost4life.com/HostingKB/Kn…icle50140.aspx and [URL=“http://webhost4life.com/HostingKB/KnowledgebaseArticle50203.aspx”]http://webhost4life.com/HostingKB/Kn…icle50203.aspx
*