The following script, in which the 'From' parameter is defined in a variable, works as expected:
However if I replace $headers with the version using a constant no mail gets sent. Any suggestions welcome.
Code:
<html>
<title>Test mail</title>
<body>
<?php
define("INFO", "info@mysite.nl");
$from="info@mysite.nl";
$recipient = 'fred@bloggs.nl';
$subject='Test subject';
$body='hello from info';
$headers = "From: Joe Bloggs <{$from}>";
//$headers = "From: Joe Bloggs <{INFO}>";
mail($recipient, $subject, $body, $headers);
?>
</body>
</html>
However if I replace $headers with the version using a constant no mail gets sent. Any suggestions welcome.