如何在电子邮件内容中使用< br>标签? [英] how to use the <br>tag in email content?

查看:86
本文介绍了如何在电子邮件内容中使用< br>标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

    $to      = "example@gmail.com" ;

$subject = "Instant estimate message";


$message ="<b>Name: </b>".$name."\r\n"."<b>Email: </b>".$email."\r\n"."<b>Mobile: </b>".$mobile."\r\n"."<b>Message: </b>".$message1;

$from = $email;
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$headers .= "From:".$from;

mail($to,$subject,$message,$headers);

即使添加了

$ message =< b>名称:</b>".$ name.</br>".< b>电子邮件:</b>".$ email."//br"." b bMobile:</b> .. $ mobile.</br>"."b消息:</b>".$ message1;

所以告诉我如何解决这个问题.

So tell me how to fix this.

推荐答案

使用< br/> 标记代替"\ r \ n" .我认为这可能对您有帮助.

use <br/> tag instead of "\r\n". I think it may help you.

这篇关于如何在电子邮件内容中使用&lt; br&gt;标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆