hi friends

i am working with mail functions my code is working on my local host but not in server please let me why taht is not working in server....

Here is my code:
$link = mysql_connect('localhost', 'root', '');
if(isset($_POST["mail"]))
{
$to=$_POST["eid"];
$subject="hiii";
$sql="SELECT password FROM registration WHERE emailid='$eid'";
mysql_select_db('ramya');
$retval=mysql_query($sql,$link);
$r=mysql_fetch_array($retval);
$message="your password is".$r[0];
$header="FROM:GOGETJOB";
if(mail($to,$subject,$message,$header ))
{
echo("<b style='font-family:Verdana, Arial, Helvetica, sans-serif; color:#0099ff'>Your password has been mailed to your email address:<b><br><center>".$eid."</center>");
}
else
{
echo("<p>Message delivery failed...</p>");
}
}