Menu
Hi,
I’ve been hired to fix a broken website and the mail function isn’t working.
Here is the code:
` if ($_POST[“Email”]!=””) {
$message = <<<EOF
Thanks for registering…bla bla bla.
EOF;
$from = “[email protected]”;
$to = $_POST[“Email”];
$subject = “Registration”;
$headers = <<<EOF
From: {$from}
Reply-To: {$from}
X-Mailer: Website.co.uk-Registration-{$_SERVER[“REMOTE_ADDR”]}:{$_SERVER[“REMOTE_PORT”]}
EOF;
mail($to,$subject,$message,$headers);
}
I don’t know if it is the X-Mailer line in the header which is not working. In PHP examples I’ve read, that line isn’t present, what exactly is it doing?
Thanks in advance!