无法使多行在 mailto 链接中正常工作
就我而言,我正在使用 Outlook 默认邮件阅读器对其进行测试。
以下内容放在 anchor href 中:
mailto:email@address.com?&subject=test&body=type%20your&body=message%20here
只有“message here”出现在邮件正文中。 (无论我使用 chrome 还是 IE)
想法?
最佳答案
您可以使用 URL encoding将换行符编码为 %0A
。
mailto:email@address.com?subject=test&body=type%20your%0Amessage%20here
虽然上述方法在很多情况下都有效,但用户 olibre points out管理 mailto URI 方案的 RFC 指定应使用 %0D%0A
(回车 + 换行)而不是 %0A
(换行)。另请参阅:Newline Representations .
关于html - mailto链接多个正文行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10356329/