I am trying to send an HTML email with the PHP code below. I think that the headers are causing problems but I don’t know how to fix them and googling has yielded no helpful results. Thank you!
$emailBody = 'Hello, Thank you for signing up for our website. Please confirm your email. <a href = "'.CONFIRM_PAGE.'&code='.$currentEmailProperties[1].'&addr='.urlencode($currentEmailProperties[0]).'&">Confirm email address</a>';
$emailBody = wordwrap($emailBody,70);
$headers = 'From: '.FROM_ADDRESS.' \r\n ';
$headers .= 'Content-type: text/html \r\n';
$headers .= "MIME-Version: 1.0\r\n";
mail($currentEmailProperties[0],'Welcome to Our Website',$emailBody,$headers)
Escape sequences are not evaluated when used in single quotes. Place them in double quotes, e.g.:
From the manual:
Reference