Abendago
asked on
php mail not sending once I add headers
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.
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 <me@somewhere.com>' . "\r\n";
mail($to,$subject,$HTML,$headers);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER