在mailto正文中插入换行符 [英] Insert a line break in mailto body

查看:290
本文介绍了在mailto正文中插入换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的mailto主体中插入换行符。
我尝试了%0A,%0D和%0D%0A。没有什么对我有用
我在Mac OSX上通过Google Chrome浏览器在Gmail,Yahoo,Apple Mail,Outlook 2010,Outlook.com和Thunderbird上进行了测试。



p>

这是我的代码:

 < a href =mailto:email @ mycompany.com?subject = Subscribe& body = Lastame%20%3A%0D%0A%20首名%20%3A>< img alt =订阅class =centerheight =50src = subscribe.pngstyle =width:137px; height:50px; color:#4da6f7; font-size:20px; display:block;宽度= 137 >< / A> 


解决方案

我建议您尝试html标签< br> ,以防您的营销应用程序会认出它。



我使用%0D% 0A 。只要电子邮件是HTML格式的,这应该是有效的。

 < a href =mailto:email@mycompany.com? subject = Subscribe& body = Lastame%20%3A%0D%0首位%20%3A>< img alt =订阅class =centerheight =50src =subscribe.pngstyle = width:137px; height:50px; color:#4da6f7; font-size:20px; display:block;宽度= 137 >< / A> 

您可能希望在名字前取出%20,否则您将有一个空格第一个字符在下一行。



一个注释,当我用你的代码测试了它,它工作(以及一些额外的间距)。您是否使用不允许HTML格式化的邮件客户端?


I would like to insert a line break into my mailto body. I tried %0A, %0D and %0D%0A. Nothing worked for me. I tested on Gmail, Yahoo, Apple Mail, Outlook 2010, Outlook.com and Thunderbird with Google Chrome on Mac OSX.

Any help please ?

Here's my code :

<a href="mailto:email@mycompany.com?subject=Subscribe&body=Lastame%20%3A%0D%0A%20Firstname%20%3A"><img alt="Subscribe" class="center" height="50" src="subscribe.png" style="width: 137px; height: 50px; color: #4da6f7; font-size: 20px; display: block;" width="137"></a>

解决方案

I would suggest you try the html tag <br>, in case your marketing application will recognize it.

I use %0D%0A. This should work as long as the email is HTML formatted.

<a href="mailto:email@mycompany.com?subject=Subscribe&body=Lastame%20%3A%0D%0AFirstname%20%3A"><img alt="Subscribe" class="center" height="50" src="subscribe.png" style="width: 137px; height: 50px; color: #4da6f7; font-size: 20px; display: block;" width="137"></a>

You will likely want to take out the %20 before Firstname, otherwise you will have a space as the first character on the next line.

A note, when I tested this with your code, it worked (along with some extra spacing). Are you using a mail client that doesn't allow HTML formatting?

这篇关于在mailto正文中插入换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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