Gmail 中的 mailto 链接
我在使用 Gmail 的网络应用程序时遇到了问题。由于某种原因,当我尝试将正文添加到链接中时,mailto
链接不起作用。只要 & 链接就可以正常工作。不使用主体分隔符。
例如:
href="mailto:?subject=test&body=this is a test"
- 不起作用
href="mailto:?subject=testbody=this is a test"
- 确实有效,但显然,它不会产生所需的结果,因为一切都进入主题。
我运行的是 Vista 64 位,并且尝试过 FF、Chrome 和 IE。另外,我还注意到 Gmail 帐户和 Google Apps 帐户中 Gmail 呈现邮件的方式有所不同。
当我在 iPhone 上查看同一封电子邮件时Outlook 一切似乎都运行良好。
任何帮助将不胜感激。
I've encountered a problem with Gmail's web application. For some reason, the mailto
links doesn't work when I try to add the body into the link. The links works fine as long as the & separator for the body is not used.
For example:
href="mailto:?subject=test&body=this is a test"
- Doesn't work
href="mailto:?subject=testbody=this is a test"
- Does work but, obviously, it doesn't generate the desired result as everything goes to the subject.
I am running Vista 64bit and I've tried FF, Chrome and IE. Also, I've noticed a difference between how Gmail renders my mail in my Gmail account and Google Apps account.
When i view the same email on my iPhone & Outlook everything seems to work fine.
Any help will be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
我可以使用完整的 url 将所有内容填充到 Gmail 界面上:
I can get everything to populate on the gmail interface using their full url:
老兄,即使我没有编码“&”,但是我替换了以下字符,然后传递电子邮件正文并接受 mailto,它确实对我有用。希望这能给你带来一些想法。
dude , even if I didn't encoding '&', however I replace followings characters, and then pass the email body and subject to mailto, it does work for me. Hope this may brings you some ideas.
尝试
href="mailto:?subject=test&body=this+is+a+test"
Try
href="mailto:?subject=test&body=this+is+a+test"
在 Firefox 19 中测试 - 工作正常。
在 Chrome 中,您需要安装扩展才能使其正常工作。
我测试的页面 - https://dl.dropbox.com/u/60854445/mail。 html
Chrome 扩展程序 - https://chrome.google.com/webstore/detail /mailto-for-gmail/dgkkmcknielgdhebimdnfahpipajcpjn/
也许他们已经修复了它。
Tested in Firefox 19 - working.
In Chrome you need to install an extension to get it working.
The page I tested - https://dl.dropbox.com/u/60854445/mail.html
Chrome extension - https://chrome.google.com/webstore/detail/mailto-for-gmail/dgkkmcknielgdhebimdnfahpipajcpjn/
Maybe they have fixed it.
考虑将空格替换为 %20。
另外,格式问题是什么?或者更清晰地了解一切会有所帮助。您说“mailto 链接不起作用”和“Gmail 在我的 Gmail 帐户和 Google Apps 帐户中呈现我的邮件”。是否发送,如果同时发送,具体区别是什么。
Consider swapping the spaces for %20.
Also, what is the formatting problem? Or better clarity in all would be helpful. you said "the mailto links doesn't work" and "Gmail renders my mail in my Gmail account and Google Apps account". Is it sending it or not, and if it's sending to both what specifically is the difference.
我一直在努力找出为什么
&subject=
无法在 Gmail 的href
中使用。所以我找到了这个
&su=
来使 subject 工作。参见下面的示例:
I was struggling to find out why
&subject=
doesn't work inhref
for Gmail.So I found this
&su=
to make subject work.See example below:
正如您在 RFC 2368 中看到的,这是根本不可能的:
As you can see in RFC 2368, this is not possible at all: