ASP CDO.Message.1错误'80040213'的传输未能连接到服务器。 /check.asp 25行 [英] asp CDO.Message.1 error '80040213' The transport failed to connect to the server. /check.asp, line 25

查看:621
本文介绍了ASP CDO.Message.1错误'80040213'的传输未能连接到服务器。 /check.asp 25行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  CDO.Message.1错误'80040213'传输未能连接到服务器。/check.asp 25行

请帮忙解决这个问题。

检查该code

 <%@ LANGUAGE = VBScript的%GT;
< HTML和GT;
< HEAD>
< /头>
<身体GT;
<%
昏暗的to_field,消息
to_field =的Request.Form(to_field)
消息=的Request.Form(信息)
创建电子邮件服务器对象
设置objCDOSYSMail =的Server.CreateObject(CDO.Message)
设置objCDOSYSCon =的Server.CreateObject(CDO.Configuration)
走出去的SMTP服务器
objCDOSYSCon.Fields(http://schemas.microsoft.com/cdo/configuration/smtpserver)=smtp.xxx.com
objCDOSYSCon.Fields(http://schemas.microsoft.com/cdo/configuration/smtpserverport)= 25
objCDOSYSCon.Fields(http://schemas.microsoft.com/cdo/configuration/sendusing)= 2
objCDOSYSCon.Fields(http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout)= 60
objCDOSYSCon.Fields.Update
更新CDOSYS配置
设置objCDOSYSMail.Configuration = objCDOSYSCon
objCDOSYSMail.From =admin@xxx.com'地址你想要的电子邮件,从
objCDOSYSMail.TO =anuradha@gmail.com'的地址的邮件将被发送到
objCDOSYSMail.Subject =主题放在这里
objCDOSYSMail.HTMLBody =fffffffffff
objCDOSYSMail.Send
关闭服务器的邮件对象
设置objCDOSYSMail =什么
设置objCDOSYSCon =什么
%GT;
< P>邮件发送成功解决<%= to_field%GT;!< / P>
< /身体GT;
< / HTML>


解决方案

您需要在发送前添加您的用户名和密码。这是因为你使用了​​ sendusing 的字段值为2。这意味着你使用的身份验证。

 '您的SMTP服务器上的用户ID
objCDOSYSCon.Fields.Item(http://schemas.microsoft.com/cdo/configuration/sendusername)=您的用户名你的SMTP服务器上的密码
objCDOSYSCon.Fields.Item(http://schemas.microsoft.com/cdo/configuration/sendpassword)=你的密码

CDO.Message.1 error '80040213'

The transport failed to connect to the server.

/check.asp, line 25

please help to solve this problem

check this code

<%@ Language=VBScript %>
<html>
<head>
</head>
<body>
<%
dim to_field, message
to_field = Request.Form("to_field")
message = Request.Form("message")
'Create the e-mail server object
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
'Out going SMTP server
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.xxx.com"
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
objCDOSYSCon.Fields.Update
'Update the CDOSYS Configuration
Set objCDOSYSMail.Configuration = objCDOSYSCon
objCDOSYSMail.From = "admin@xxx.com" ' the address you want the email to be from
objCDOSYSMail.TO = "anuradha@gmail.com"  'the address the mail is to be sent to
objCDOSYSMail.Subject = "Subject goes here"
objCDOSYSMail.HTMLBody = "fffffffffff"
objCDOSYSMail.Send
'Close the server mail object
Set objCDOSYSMail = Nothing
Set objCDOSYSCon = Nothing
%>
<p>Mail sent successfully to address <%=to_field%>!</p>
</body>
</html>

解决方案

You need to add your user name and password before sending. This is because you used a value of 2 in the sendusing's field. This means you're using authentication.

'Your UserID on the SMTP server'
objCDOSYSCon.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "yourusername"

'Your password on the SMTP server'
objCDOSYSCon.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "yourpassword"

这篇关于ASP CDO.Message.1错误'80040213'的传输未能连接到服务器。 /check.asp 25行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆