So when i submit the form i get "sorry an error occured" as opposed to the mail_success message even though the form data was mailed and received.

form:
Code:
<form action="contact.php" method="POST" id='contact_form'>
				<ul>						
					<li> 
						<label for="name">Name</label>
						<input type='text' name='name' id='name' />
						<div class="clear"></div>
						<p id='name_error' class='error'>Enter your name</p>
					</li> 
					<li> 
						<label for="email">Email Address</label>
						<input type='text' name='email' id='email' />
						<div class="clear"></div>
						<p id='email_error' class='error'>Enter a valid email address</p>
					</li> 
					<li> 
						<label for="message">Message</label>
						<textarea name='message' id='message' rows="30" cols="30"></textarea>
						<div class="clear"></div>
						<p id='message_error' class='error'>Enter your message</p>
					</li> 
                    <li>
                    <p id='mail_success' class='success'>Thank you for contacting me, I will get back to you as soon as possible.</p>
					<p id='mail_fail' class='error'>Sorry, an error has occured. Please try again later.</p>
					<div id="button">
					<input type='submit' id='send_message' class="button" value='Submit' />
					</div>
                    </li>
                    </ul>
            </form>
contact.php:
Code:
<?php

$EmailFrom = Trim(stripslashes($_POST['email'])); 
$EmailTo = "you@yourdomain.com";
$Subject = "Contact Form";
$name = Trim(stripslashes($_POST['name'])); 
$email = Trim(stripslashes($_POST['email'])); 
$message = Trim(stripslashes($_POST['message'])); 


$validationOK=true;
if (Trim($name)=="") $validationOK=false;
if (Trim($email)=="") $validationOK=false;
if (Trim($message)=="") $validationOK=false;
if (!$validationOK) {
  print "failed";
  exit;
}


$Body = "";
$Body .= "name: ";
$Body .= $name;
$Body .= "\n";
$Body .= "email: ";
$Body .= $email;
$Body .= "\n";
$Body .= "message: ";
$Body .= $message;
$Body .= "\n";


$success = mail($EmailTo, $Subject, $Body, "From: <$email>");

if ($success){
  print "sent";
}
else{
  print "failed";
}
?>
contact.js:
Code:
$(document).ready(function(){
			$('#send_message').click(function(e){
				
				e.preventDefault();
				
				var error = false;
				var name = $('#name').val();
				var email = $('#email').val();
				var message = $('#message').val();
				
				
				if(name.length == 0){
					var error = true;
					$('#name_error').fadeIn(500);
				}else{
					$('#name_error').fadeOut(500);
				}
				if(email.length == 0 || email.indexOf('@') == '-1'){
					var error = true;
					$('#email_error').fadeIn(500);
				}else{
					$('#email_error').fadeOut(500);
				}
				if(message.length == 0){
					var error = true;
					$('#message_error').fadeIn(500);
				}else{
					$('#message_error').fadeOut(500);
				}
				
				if(error == false){

					$('#send_message').attr({'disabled' : 'true', 'value' : 'Sending...' });
					
					$.post("contact.php", $("#contact_form").serialize(),function(result){

						if(result == 'sent'){

							 $('#button').remove();

							$('#mail_success').fadeIn(500);
						}else{

							$('#mail_fail').fadeIn(500);
			
							$('#send_message').removeAttr('disabled').attr('value', 'Submit');
						}
					});
				}
			});    
		});
any help greatly appreciated...this has been driving me insane!