mailto 链接多个正文行 [英] mailto link multiple body lines

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

问题描述

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

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

就我而言,我正在使用 Outlook 默认邮件阅读器对其进行测试.

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

以下内容放在锚点 href 中:

The following is put in an anchor href:

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

电子邮件正文中仅显示此处的消息".(无论我使用 chrome 还是 IE)

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

想法?

推荐答案

您可以使用 URL 编码 将换行符编码为 %0A.

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

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

虽然以上似乎在许多情况下都有效,但用户 olibre 指出管理 mailto URI 方案的 RFC 指定应该使用 %0D%0A(回车 + 换行)代替 %0A(换行).另请参阅:换行表示.

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天全站免登陆