为了账号安全,请及时绑定邮箱和手机立即绑定

htmlentities 在使用 PHPmailer 时忽略 <br>

htmlentities 在使用 PHPmailer 时忽略 <br>

PHP
繁花如伊 2022-12-23 10:08:25
前段时间我做了一个联系表来发送电子邮件。我有这个:If  ($validity !='Good@Ripsi'){      $to = "contact-us@xx-xxxx.com";      $subject = "xx xxxx new Subscriber";      $email_address = htmlentities($_GET['email_address']);      $headers = "xxxxxxxxxx" . "\r\n" .      mail($to,$subject,$email_address,$headers);      header("Location: index.php");}这很好用。在我读到虽然我不打算发送数以千计的 Newletters 之后,最好使用 PHPmailer,否则它可能被视为垃圾邮件并被阻止。我不太了解那些邮寄的东西。所以我读了一个教程,它工作得很好,但有一点:htmlentities 不再做这项工作,所有<br>的都在接待处被忽略。我检查过:$mail->IsHTML(true);帮助将不胜感激。
查看完整描述

1 回答

?
神不在的星期二

TA贡献1963条经验 获得超6个赞

我不明白IsHTML. 在这种情况下,它必须设置为false



查看完整回答
反对 回复 2022-12-23
  • 1 回答
  • 0 关注
  • 76 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信