我想在邮件正文段落中添加新行。我搜索了所有其他相同的问题,但似乎没有一行能够正常工作
$body = "Dear $surname $name \r\n
Thank you for your Pre-registration for Global .\r\n
Please print the attached e-ticket with your personal barcode and bring it to the reception of the exhibition.\r\n
This barcode includes data about you which is required during registration. Having this barcode will considerably speed up the registration process
Organizing committee.\r\n".
$body = "Print e-ticket
($imageurl) .\r\n".
此方法在一行中显示全部 如何更改它才能正确显示? 谢谢
答案 0 :(得分:1)
如果您使用身体的html格式,则必须使用<br>
代替\r\n
ps:你有两次$body = ....
所以你的第二个会覆盖第一个
答案 1 :(得分:1)