浏览器如何与电子邮件程序通信?
我已经搜索了一下,但没能找到任何有用的东西。
浏览器如何与 Thunderbird 和 Outlook(在 Mac 上,如果相关的话)等电子邮件程序进行通信?
我所说的“沟通”是指通过 mailto: 链接创建一个具有指定地址、主题、正文的新电子邮件窗口的过程。浏览器如何让电子邮件程序知道为每个字段输入什么内容?使用命令行(至少对于 Thunderbird 来说)没有多大意义,因为这会在 Mac 上打开一个全新的 Thunderbird 实例。
我还没有找到任何类型的 API,所以如果有人能指出正确的方向,我将不胜感激。谢谢!
I've searched around for a bit, but haven't been able to find anything useful on this.
How do browsers communicate with email programs, such as Thunderbird and Outlook (on the Mac, if that's relevant)?
By communicate, I mean the process it goes through to create a new email window with a designated to address, subject, body, through the mailto: link. How does the browser let the email program know what to put for each field? Using the command line (for Thunderbird, at least) didn't make much sense, as that opens a brand new instance of Thunderbird on the Mac.
I haven't found any sort of API for this, so if someone can point me in the right direction, that would be greatly appreciated. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在 Windows 上,浏览器使用系统定义的“默认”电子邮件客户端。
它存储在Windows注册表中并定义打开邮件程序的命令行。您可以在 Microsoft 网站上找到更多信息和示例。
http://msdn.microsoft.com/en-us/library/windows/desktop/cc144109%28v=vs.85%29.aspx#sample_mail_program
如果我在注册表中查找Thunderbird,它似乎执行:
我不知道它在Mac上是如何工作的!
On windows, the browser use the "default" email client defined by the system.
It's stored in the Windows registry and define the command line to open the mail program. You can find more info and an exemple on the Microsoft website.
http://msdn.microsoft.com/en-us/library/windows/desktop/cc144109%28v=vs.85%29.aspx#sample_mail_program
If I look in my registry for thunderbird, It seems to execute:
I have no idea how it works for the mac!
发送到邮件客户端的附加信息通常(据我所知)附加在 mailto 命令的后面。
在下面的示例中,客户端应自动将主题填写为“来自 stackoverflow 的问候”,
我在下面列出了我所知道的其他命令:
编辑主题:
?subject=
编辑抄送:
?cc=
编辑密件抄送:
?bcc=
编辑正文内容:
?body=
这些也可以一起使用,方法是将它们放在一起并交换“?”对于“&”,例如,
这应该创建一封主题为“你好”和正文为“再见”的电子邮件,
我希望这有帮助!
the additional information sent to the mail client is usually (from what i have seen) tacked onto the back of the mailto command.
in the following example, the client should automatically fill in the subject as 'greetings from stackoverflow'
i have listed the other commands i know of below:
to edit subject:
?subject=
to edit cc:
?cc=
to edit bcc:
?bcc=
to edit body content:
?body=
these can also be used together by placing them after eachother and swapping the '?' for a '&', example
this should create an email with the subject of 'hello there' and a body message of 'goodbye'
i hope this helps!
一个非常有用的老歌解释了名为 RCDefault 的表面,
它向您显示 Finder 或浏览器使用(可以使用)URL 来调用其他应用程序。
我在这里附上 OSX 上邮件应用程序的屏幕截图:
然后,操作系统将使用以下命令调用此应用程序: URL(或文件)并且应用程序应该了解如何打开该 URL。
Apple 的 mailto 协议的 URL 方案位于 此处< /a>
您应该能够为您需要使用的应用程序找到其他方案。
A very useful oldies that explains the surface called RCDefault
It shows you that the Finder or the Browser uses (can use) URLs to call other applications.
I am attaching the screenshot for the Mail application on OSX here:
The OS will then call this application with the URL (or file) and the application is supposed to understand how to open that URL.
The URL scheme for the mailto protocol for apple, is here
You should be able to find other schemes for the application you need to use.