2
我想設置一個腳本來使用交換帳戶的電子郵件。我想用vbscript來使用CDO(或等價物)。目標是通過交換賬戶的發送文件夾來跟蹤電子郵件通信。 我使用Exchange 2007的如何使用CDO與Exchange與vbscript
我想設置一個腳本來使用交換帳戶的電子郵件。我想用vbscript來使用CDO(或等價物)。目標是通過交換賬戶的發送文件夾來跟蹤電子郵件通信。 我使用Exchange 2007的如何使用CDO與Exchange與vbscript
使用Microsoft NTLM(http://msdn.microsoft.com/en-us/library/aa378749(v=vs.85).aspx) 在CDO這是一個CdoProtocolsAuthentication枚舉(http://msdn.microsoft.com/en-us/library/ms526961(v=exchg.10).aspx)
Const cdoSendUsingPickup = 1 'Send message using the local SMTP service pickup directory.
Const cdoSendUsingPort = 2 'Send the message using the network (SMTP over the network).
Const cdoAnonymous = 0 'Do not authenticate
Const cdoBasic = 1 'basic (clear-text) authentication
Const cdoNTLM = 2 'NTLM
dim objEmail
Set objEmail = CreateObject("CDO.Message")
objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing")= cdoSendUsingPort
'Name or IP of remote SMTP server
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="exchange"
'Server port
objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") =25
objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpAuthenticate") = cdoNTLM
objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/NNTPAccountName") = "USERNAME"
objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/SaveSentItems") = TRUE
objEmail.Configuration.Fields.Update
objEmail.From = "FROM <[email protected]>"
objEmail.To = "[email protected]"
objEmail.Subject = "SUBJECT"
objEmail.Textbody = "BODY "
objEmail.Send
這是SMTP,不交流 – Wobbles 2017-09-26 19:13:20