我正在尝试使用下面的 PHP 代码发送 HTML 电子邮件。我认为标题引起了问题,但我不知道如何解决它们,并且谷歌搜索没有产生任何有用的结果。谢谢!
$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)