mailto链接多个身体线 [英] mailto link multiple body lines

查看:129
本文介绍了mailto链接多个身体线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无法让多行在mailto链接中正常工作



在我的情况下,我使用Outlook默认邮件阅读器对其进行测试。

以下内容放入锚点href:

mailto:email @ address .com?& subject = test& body = type%20your& body = message%20here

电子邮件正文。 (无论我使用chrome还是IE)

想法

解决方案

您可以使用网址编码将新行编码为%0A



mailto:email@address.com?subject = test& body = type%20your%0Amessage%20here



尽管上述方法在很多情况下都可以使用,但用户olibre 指出控制mailto URI方案的RFC指定应该使用%0D%0A (回车+换行)而不是%0A (换行)。另请参阅:换行符


having trouble getting multiple lines to work correctly in a mailto link

In my case I'm testing it with an Outlook default mail reader.

The following is put in an anchor href:

mailto:email@address.com?&subject=test&body=type%20your&body=message%20here

only "message here" shows up in the email body. (whether I use chrome or IE)

thoughts?

解决方案

You can use URL encoding to encode the newline as %0A.

mailto:email@address.com?subject=test&body=type%20your%0Amessage%20here

While the above appears to work in many cases, user olibre points out that the RFC governing the mailto URI scheme specifies that %0D%0A (carriage return + line feed) should be used instead of %0A (line feed). See also: Newline Representations.

这篇关于mailto链接多个身体线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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