Home > Software engineering >  CDO. Message. 1 error '80040213' transport connection with the server failed./testsendMail
CDO. Message. 1 error '80040213' transport connection with the server failed./testsendMail

Time:11-19

<%
Const email_from="1124663858 @qq.com"
Const password="fanlianghao"
Const eamil_to="1796906142 @qq.com"
The file="C: \ hello. TXT"
The set myMail=CreateObject (" cdos. The Message ")
MyMail. Subject="Sending mail with cdos"
MyMail. From=email_from
MyMail. TO=eamil_to
MyMail. TextBody="This is a big srupise"
MyMail. AddAttachment file 'email attachments file path
Const schema="http://schemas.microsoft.com/cdo/configuration/"
With myMail. Configuration. Fields' use With reduce code input keywords
The Item (schema & amp; "Sendusing")=2 'using SMTP server on the network, rather than local SMTP server. The Item (schema & amp; "Smtpserver")="smtp.gmail.com" 'SMTP server address
The Item (schema & amp; "Smtpauthenticate")=1 'server authentication
The Item (schema & amp; "Sendusername") the sender email=email_from '
The Item (schema & amp; "Sendpassword") the sender email address Password=Password '
The Item (schema & amp; "Smtpserverport")=465 'SMTP server port
The Item (schema & amp; "Smtpusessl)=false" 'whether or not to use SSL
The Item (schema & amp; "Smtpconnectiontimeout")=60 'connect to the server timeout
The Update 'Update set
End With
MyMail. Send 'email
% & gt;