html - Mailto:准则和字符限制

标签 html encoding outlook mailto

我正在尝试编写一个应用程序,允许用户使用 mailto 标记从 outlook 发送电子邮件。我知道使用 mailto,可能会限制可以传递的字符数以及编码。

有谁知道我可以使用的确切字符数,以及在编码特殊字符时应遵循哪些准则?您可以使用的最大字符数是多少?正文和主题或包括 mailto 语法的整行?

例如我将有以下内容:

<a href='mailto:test@gmail.com?subject=Test Mail&body=Line one.%0D%0ALine two.'>Test Link</a>

这会是 69 个字符吗??

忘了说了,支持的浏览器是IE6。

如有任何帮助,我们将不胜感激。

谢谢

最佳答案

据我所知没有限制。

HTML 4 规范没有提到限制

Authors may create links that do not lead to another document but instead cause email to be sent to an email address. When the link is activated, user agents should cause a mail program to open that includes the destination email address in the "To:" field.

To cause email to be sent when a link is activated, specify a MAILTO URL as the value of the href attribute.

http://www.w3.org/TR/WD-html40-970917/struct/links.html#h-13.2.2

但是,许多网站报告了256 个字符的限制

您应该进行测试以确保。

您可能还会发现这个问题和答案很有启发性:What is the email subject length limit?

关于html - Mailto:准则和字符限制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7459327/

相关文章:

html - CSS 使 div 在顶部和底部 flex 但在左侧和右侧笔直

html - 自定义CSS按钮div问题

jquery - 我应该在生产代码中使用 Google 的 JSAPI 吗?

python - 如何向 python 2.6 添加新的编码?

html - Div 填充/背景颜色在 Outlook 中不起作用

javascript - 目标父 div 包含来自 iframe 的 iframe

javascript - Javascript 中的奇怪字符导致它无法加载

python - 用python解析outlook .msg文件

python - 使用 Python 脚本从 Outlook 2013 下载附件

java - 将 byte[] 编码为 String