我正在尝试通过经典 asp 发送电子邮件,但它给了我以下错误。
CDO.Message.1 error '80040213'
The transport failed to connect to the server.
/hotemp/regnew.asp, line 507
最初它工作正常,突然出现上述错误。我用谷歌搜索但没有帮助。关于如何克服这个问题的任何建议。谢谢
我的代码如下:
<%
Set Mail = CreateObject("CDO.Message")
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="smtp.gmail.com"
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="myemail@gmail.com"
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="password"
Mail.Configuration.Fields.Update
Mail.Subject="Sending via classic asp"
Mail.From="abcdef@gmail.com"
Mail.To="wxyz@gmail.com"
Mail.TextBody="please fill the form"
Mail.Send ` line 507
Set Mail = Nothing
%>