qualcuno mi può aiutare? qualcuno sa per caso dirmi perché non manda la mail??

a me sembra tutto a posto ma ho verificato che quando arriva alla condizione che riporto qui , mi da "success=no" quindi non si verifica l'invio. ma nn capisco dove stia il problema
codice:
       
if( mail( $receiver,  "Flash Contact Form - $contact_subject", $email_body, "from:".$sender ) ) 
	{
		echo "&success=yes";
	}
	else
	{
		echo "&success=no";
	}
il codice comunica con actionscript 3.0 e la comunicazione avviene, anche perche se le variabili fossero vuote dovrebbe comunque mandare l'email.

il codice completo è il seguente:
codice:
<?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 = "carlokyle@hotmail.it";
	$client_ip = $_SERVER['REMOTE_ADDR'];
	$email_body = "Name: $contact_name \n Email: $sender \n\n Subject: $contact_subject \n\nMessage: \n\n$contact_message \n\nIP: $client_ip \n\nFlash Contact Form provided by http://www.flashmo.com";		
	$extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();
	
	$emailAutoReply = "Hi $contact_name, \n\nWe have just received your E-Mail. We will get
in touch in a few days. Thank you!  \n\n$siteName ";
$autoReply = "From: $receiver\r\n" . "Reply-To: $receiver \r\n" . "X-Mailer: PHP/" . phpversion();

	mail( $sender, "Auto Reply: $contact_subject", $emailAutoReply, $autoReply );




	if( mail( $receiver,  "Flash Contact Form - $contact_subject", $email_body, "from:".$sender ) ) 
	{
		echo "&success=yes";
	}
	else
	{
		echo "&success=no";
	}
}
?>