I've recently installed my server on VPS, PHP mail is not working, I've tryed everywhere but I can't get it to work. If it is not a syntax error I would appreciate if someone could help with setting PHP mail up. Im running ubuntu 10.04
My code is:
$ToEmail = 'my@email.com';
$EmailSubject = 'Site contact form ';
$mailheader = "From: ".$_POST["email"]."
";
$mailheader .= "Reply-To: ".$_POST["email"]."
";
$mailheader .= "Content-type: text/html; charset=iso-8859-1
";
$MESSAGE_BODY = "Name: ".$_POST["name"]."<br>";
$MESSAGE_BODY .= "Email: ".$_POST["email"]."<br>";
$MESSAGE_BODY .= "Message: ".nl2br($_POST["message"])."<br>";
$MESSAGE_BODY .= "IP: ".$_SERVER['REMOTE_ADDR']";
mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure");