Home > Software engineering >  Masters to help you, please have a look at VB script mass emails, always prompt: a runtime error: -
Masters to help you, please have a look at VB script mass emails, always prompt: a runtime error: -

Time:11-03

VB script mass emails, always prompt: a runtime error: - 2147220978 (8004020 e), the server rejected the sender's address, the server response is: 501 5.1.7 Ivalid address, how to solve such problems

StUl="http://schemas.microsoft.com/cdo/configuration/"
The Set vCDO=CreateObject (" cdos. The Message ")
With vCDO. Configuration. Fields
The Item (stUl & amp; "Smtpserver")="XXXX.XXXX.com"
The Item (stUl & amp; "Sendusing")=2
The Item (stUl & amp; "Sendpassword")="zhangyl"
. The Update
End With
VCDO. From=Trim (" OM_Mediation ")
VCDO. Textbody=strContent
VCDO. Subject=strTitle
VCDO. To=strTo
VCDO. The Send

CodePudding user response:

Your SMTP server? If not, that there is no way,

CodePudding user response:

1) a letter can send?
2) plus time delay between two letters tried yet?

CodePudding user response:

SMTP server is our company's, the sender's address is what, how to configure the SMTP server? Thank you very much

All mail hair don't go out, plus time delay is also useless

CodePudding user response:

Do not use the code, using outlook send a try can be successful,

CodePudding user response:

Error message "... Ivalid address... "
The debug. Print Trim (" OM_Mediation ") to see

CodePudding user response:

Well, silly, above the print out is also a OM_Mediation string. But you can be sure of the sender's address is correct?

CodePudding user response:

to the background to see whether the memory is full
  •  Tags:  
  • VBA
  • Related