使用VB脚本群发邮件时,一直提示: 运行时错误:-2147220978(8004020e)。服务器拒绝了发件人地址,服务器响应为:501 5.1.7 Ivalid address,如何解决这类问题 stUl = "http://schemas.microsoft.com/cdo/configuration/"
Set vCDO = CreateObject("CDO.Message")
With vCDO.Configuration.Fields
.Item(stUl & "smtpserver") = "XXXX.XXXX.com"
.Item(stUl & "sendusing") = 2
.Item(stUl & "sendpassword") = "zhangyl"
.Update
End With
vCDO.From = Trim("OM_Mediation")
vCDO.Textbody = strContent
vCDO.Subject = strTitle
vCDO.To = strTo
vCDO.Send
Set vCDO = CreateObject("CDO.Message")
With vCDO.Configuration.Fields
.Item(stUl & "smtpserver") = "XXXX.XXXX.com"
.Item(stUl & "sendusing") = 2
.Item(stUl & "sendpassword") = "zhangyl"
.Update
End With
vCDO.From = Trim("OM_Mediation")
vCDO.Textbody = strContent
vCDO.Subject = strTitle
vCDO.To = strTo
vCDO.Send
debug.print Trim("OM_Mediation") 看看咯