启动 Outlook 并从命令行预先填充电子邮件 [英] Starting Outlook and having an email pre-populated from command line
问题描述
这可能吗?我想让 To:、Body 和一个附件都预先填充好,这样用户所要做的就是单击发送.谢谢!
打开新邮件(ipm.note
是 邮件类别)
outlook.exe/c ipm.note
打开一封新邮件并填充发件人:
outlook.exe/c ipm.note/m someone@microsoft.com
打开带有附件的新邮件:
outlook.exe/c ipm.note/a 文件名
组合:(下面的第一个在 Office 2016 中不起作用,第二个在)
outlook.exe/c ipm.note/m someone@microsoft.com&subject=test%20subject&body=test%20bodyOutlook.exe/c ipm.note/m "someone@microsoft.com&subject=test%20subject&body=test%20body"
必须使用 %20 来产生一个空格.
- 更多详情请访问 用于创建预先指定地址的电子邮件的命令行
- 可以找到命令行开关这里
例如,这适用于经典的 Outlook 2016(内部版本 16.0.4849.1000).
但是,正如 Snozzlebert 所述 在评论中,对于 Outlook 365 版本 2001(内部版本 12430.20184),语法为:
outlook.exe/c ipm.note/m "someone@microsoft.com?subject=test"
<块引用>
罪魁祸首是电子邮件地址后面的 &
- 将其替换为 ?
解决了问题.
微软好像把语法改成了 HTML mailto 语法.
Is this possible? I want to have the To:, Body, and an Attachment all pre-populated so all the user has to do is click send. Thanks!
Open a new mail message (ipm.note
is the message class for emails)
outlook.exe /c ipm.note
Open a new mail message and populate sender:
outlook.exe /c ipm.note /m someone@microsoft.com
Open a new mail message with attachment:
outlook.exe /c ipm.note /a filename
Combination: (First one below didn't work in Office 2016, second did)
outlook.exe /c ipm.note /m someone@microsoft.com&subject=test%20subject&body=test%20body
outlook.exe /c ipm.note /m "someone@microsoft.com&subject=test%20subject&body=test%20body"
The %20 has to be used to produce a blank space.
- More details at Command Line for Creating a Pre-Addressed E-mail Message
- Command-line switches can be found here
This works for instance with a classic Outlook 2016 (build 16.0.4849.1000).
But, as Snozzlebert notes in the comments, for a Outlook 365 Version 2001 (Build 12430.20184) the syntax would be:
outlook.exe /c ipm.note /m "someone@microsoft.com?subject=test"
the culprit was the
&
after the email-address - replacing it with?
solved the problem.
It seems that Microsoft changed the syntax to the HTML mailto syntax.
这篇关于启动 Outlook 并从命令行预先填充电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!