Email 这个登录窗口是什么?使用VBSCRIPT发送电子邮件
图像--> 当我使用以下脚本连接到exchange邮件服务器以发送电子邮件时,上面的登录窗口会提示我请求域凭据。如何使我的脚本自动化,这样我就不会得到登录窗口。发送电子邮件的工作站未加入AD域Email 这个登录窗口是什么?使用VBSCRIPT发送电子邮件,email,authentication,vbscript,exchange-server,cdo.message,Email,Authentication,Vbscript,Exchange Server,Cdo.message,图像--> 当我使用以下脚本连接到exchange邮件服务器以发送电子邮件时,上面的登录窗口会提示我请求域凭据。如何使我的脚本自动化,这样我就不会得到登录窗口。发送电子邮件的工作站未加入AD域 Function sendMail(a,b,c) set objMsg = CreateObject("CDO.Message") set objConf = CreateObject("CDO.Configuration") Set objFlds = objConf.Fields With objF
Function sendMail(a,b,c)
set objMsg = CreateObject("CDO.Message")
set objConf = CreateObject("CDO.Configuration")
Set objFlds = objConf.Fields
With objFlds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "email server name"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = a
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = b
.Update
End With
strBody = "Script has finished running, 6005 is finished"
With objMsg
Set .Configuration = objConf
.To = c
.From = c
.Subject = "[AUTO] Script has finished running!"
.TextBody = strBody
.Fields.update
.Send
End With
端函数
sendMail "username","password","my email address"
谢谢
约翰用绳子
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 2
您正在请求NTLM身份验证。这可能会导致显示登录对话框
请尝试以下方法:
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
这将使用带有“基本身份验证”的
sendusername
和sendpassword
字段。请注意,某些电子邮件服务器配置为拒绝“基本身份验证”。此信息不清楚提示的原因。抱歉。由于服务器的配置,我必须使用NTLM