The code below
Private Sub Command1_Click ()
Dim SJR, FJMC As string 'recipient mailbox, attachment name
Dim cm As New CDO. Message 'cdos. The Message is an email object
SJR="[email protected]"
FJMC="\ 111. PDF"
Cm. The From="4645419 @qq.com" 'set the sender email "
Cm.=SJR 'To set the recipient email
Cm. Subject="theme: mailing test" 'set the mail Subject
Cm. HtmlBody="email test" 'using HTML email
Cm. AddAttachment App. Path & amp; FJMC 'hair accessories name and address
StUl="http://schemas.microsoft.com/cdo/configuration/" 'Microsoft server url, fixed, no change
With the cm. The Configuration. Fields
The Item (stUl & amp; "Smtpserver")="smtp.qq.com" 'SMTP server address
The Item (stUl & amp; "Smtpserverport")=25 'SMTP server port
The Item (stUl & amp; "Sendusing")=2 'send port
The Item (stUl & amp; "Smtpauthenticate")=1 'need to provide user name and password, zero is not provide'
The Item (stUl & amp; "Sendusername")="4645419" 'the name of the sender email, need not input @ behind things
The Item (stUl & amp; "Sendpassword")="19500308" 'sender email password
. The Update
End With
Cm. Send 'finally, of course, is sent to perform
The Set of cm=Nothing
End Sub
' 'have done a CDO quotes to
Prompt error is
Real-time error '- 2147220975 (8004021) :
Here is the code, the last has a not available
Debugging points to the cm. The Send 'finally, of course, is sent to perform
CodePudding user response:
You open this site to look at, the email function may have been unavailableStUl="http://schemas.microsoft.com/cdo/configuration/" 'Microsoft server url, fixed, no change
CodePudding user response:
If you don't look for email try jmail componentCodePudding user response:
http://lopechu6.blogspot.com/2012/12/vb6jmail.htmlCodePudding user response:
Use QQ email nowCodePudding user response:
Don't quite understand, the above procedure is difficulty, don't quite understand the statements inside theCodePudding user response:
https://www.baidu.com/s? Wd=real-time error % 27-2147220975 (80040211)