Mailto:指南和字符限制
我正在尝试编写一个应用程序,该应用程序将允许用户使用 mailto 标签从 Outlook 发送电子邮件。我知道对于 mailto,涉及可以传递的字符数以及编码的限制。
有谁知道我可以使用的确切字符数,以及在编码特殊字符时应遵循哪些准则?您可以使用的最大字符数是多少?正文和主题还是包括 mailto 语法的整行?
例如,我将有以下内容:
<a href='mailto:[email protected]?subject=Test Mail&body=Line one.%0D%0ALine two.'>Test Link</a>
这将是 69 个字符吗?
忘了说了,支持的浏览器是IE6。
任何帮助将不胜感激。
谢谢
I'm trying to code an application which will allow users to send emails from outlook using the mailto tag. I know with the mailto, there involves limitation of # of characters that may be passed, as well as encoding.
Does anyone know the exact count of characters I can use, and what guidelines to follow when it comes to encoding special characters? What is counted in the max number of characters you can use? Body and Subject or the whole line including mailto syntax?
For example I will have the following:
<a href='mailto:[email protected]?subject=Test Mail&body=Line one.%0D%0ALine two.'>Test Link</a>
Would this be 69 characters??
Forgot to mention, supported browser will be IE6.
Any help would be appreciated.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知没有限制。
HTML 4 规范没有提及任何限制
http://www.w3. org/TR/WD-html40-970917/struct/links.html#h-13.2.2
但是,许多网站报告256字符限制。
您应该进行测试以确定。
您可能还会发现这个问题和答案很有启发:电子邮件主题长度限制是多少?
As far as I know there is no limit.
The HTML 4 spec says nothing about a limit
http://www.w3.org/TR/WD-html40-970917/struct/links.html#h-13.2.2
However, many sites report a 256 character limit.
You should test to be sure.
You may also find this question and answers illuminating: What is the email subject length limit?
同样的问题在这里,到目前为止还没有好的结果。 IE9 的限制是每个 href="..." 大约 505 个字符,Chrome 21 更好 - 大约 2000 个字符。
更新!根据 这些人 有一个解决方法,它似乎对我有用:
这将在客户端收到响应后启动脚本并打开 MailClient 窗口。 LongMailToText 应该遵循所有标准规则,除了长度 - 到目前为止我已经能够通过它发送超过 2000 个字符。
Same problem here, so far no good. IE9 has a limit of around 505 characters per href="...", Chrome 21 is better - around 2000 chars.
Update! According to this guys there is a workaround, and it seems to work for me:
This will launch the script and open MailClient window as soon as client gets the response. LongMailToText should follow all standard rules, except for length - so far i was able to send over 2000 chars through it.