开发者

Ways to send E-Mails over MS Exchange with VBScript

I have to write a VBScript which will run on a Windows Server 03 (no Office, SMTP, etc开发者_Go百科. installed - like it's a fresh installation). This script should send E-Mails over an MS Exchange Server (on another server). So now I have a meeting with the head of the team managing those Servers. To prepare I'd like to know what ways I have to send an E-Mail from a VBScript over an MS Exchange (also including how to authenticate with the Exchange Server)?

As far as my googling goes there is one way with CDO (only SMTP?) which can use the current user for authentication or a clear text username & password.

edit: Or am I mistaking and there is only SMTP for sending E-Mails over Exchange Server? Also that there is only authentication with clear text / using current credentials?

Cheers, Gregor


There are other ways as well.

I'd prefer Exchange WebDav for previous versions of Exchange server

and use Exchange WebServices with the latest version of Exchange.

These method requires no client install so can be used anywhere.

WebDav: http://www.msexchange.org/articles/Access-Exchange-2000-2003-Mailbox-WebDAV.html WebService: http://msdn.microsoft.com/en-us/library/aa563009(v=EXCHG.140).aspx

EWS scripting sample: Link


If you use CDO with SMTP and use Windows Authentication (NTLM).

Set objMessage = CreateObject("CDO.Message")
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 2

Setting that value to 0 makes it not use authentication, setting it to 1 uses basic authentication, and 2 makes it use NTLM.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜