Why does the below code not send my email? When I remove the "headers" variable from the mail function, it sends right away with no problems.
My $to and $subject and $html vars are set further up but as I said, it works fine as soon as I remove the $headers
I'm trying to send html encoded email.
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'To: Mary <$to>' . "\r\n";
$headers .= 'From: Birthday Reminder <firstname.lastname@example.org>' . "\r\n";