从WSH发送/邮件收件人

时间:2021-08-07 18:13:56

I am trying to implement in windows scripting host the same function as windows Send To/Mail Recipient does. Did not find anything usefull on google except steps to instantiate Outlook.Application and directly calling its methods.

我试图在Windows脚本主机中实现与Windows Send To / Mail Recipient相同的功能。没有在谷歌上找到任何有用的东西,除了实例化Outlook.Application并直接调用其方法的步骤。

I need to go the same path as windows do, as there is a mix of Outlook and Lotus Notes installed, I don't see it good to perform some sort of testing and deciding which object to talk to...

我需要和windows一样走路,因为安装了Outlook和Lotus Notes,我认为执行某种测试并决定与哪个对象进行通信并不好...

What I have found is that the actual work is done by sendmail.dll, there is a handler defined in registry under HKEY_CLASSES_ROOT\CLSID\{9E56BE60-C50F-11CF-9A2C-00A0C90A90CE}. I would like either to use this dll somehow or to simulate the same steps it does.

我发现实际工作是由sendmail.dll完成的,在HKEY_CLASSES_ROOT \ CLSID \ {9E56BE60-C50F-11CF-9A2C-00A0C90A90CE}下的注册表中定义了一个处理程序。我想要以某种方式使用这个DLL或模拟它所做的相同步骤。

Thanks for your input.

感谢您的输入。

2 个解决方案

#1


1  

I found one item on CodeProject from 2003 that might be relevant.

我在2003年的CodeProject上找到了一个可能相关的项目。

#2


1  

The contents of the sent to menu in Windows is a bunch of files (usually links) in the C:\Documents and Settings\username\SendTo folder. You need to add your script - or a link to it - there.

Windows中发送到菜单的内容是C:\ Documents and Settings \ username \ SendTo文件夹中的一堆文件(通常是链接)。您需要在那里添加脚本 - 或其链接。

For your script you could check if certain registry keys exist to detect Outlook and Lotus Notes.

对于您的脚本,您可以检查是否存在某些注册表项以检测Outlook和Lotus Notes。

Or if you don't care if the message shows up in sent items, just use CDOSYS.NewMail to send the message directly to the SMTP-server.

或者,如果您不关心邮件是否显示在已发送的项目中,只需使用CDOSYS.NewMail将邮件直接发送到SMTP服务器。

CDOSYS documentation

#1


1  

I found one item on CodeProject from 2003 that might be relevant.

我在2003年的CodeProject上找到了一个可能相关的项目。

#2


1  

The contents of the sent to menu in Windows is a bunch of files (usually links) in the C:\Documents and Settings\username\SendTo folder. You need to add your script - or a link to it - there.

Windows中发送到菜单的内容是C:\ Documents and Settings \ username \ SendTo文件夹中的一堆文件(通常是链接)。您需要在那里添加脚本 - 或其链接。

For your script you could check if certain registry keys exist to detect Outlook and Lotus Notes.

对于您的脚本,您可以检查是否存在某些注册表项以检测Outlook和Lotus Notes。

Or if you don't care if the message shows up in sent items, just use CDOSYS.NewMail to send the message directly to the SMTP-server.

或者,如果您不关心邮件是否显示在已发送的项目中,只需使用CDOSYS.NewMail将邮件直接发送到SMTP服务器。

CDOSYS documentation