标题:邮件发送问题,错误80040211 是什么问题啊,急!
只看楼主
aoihikari
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-11-1
 问题点数:0 回复次数:0 
邮件发送问题,错误80040211 是什么问题啊,急!

邮件发送问题,错误80040211 是什么问题啊,急!
这个是源代码,提示红字那行有错误,那位大仙儿能帮帮我啊

Const cdoSendUsingMethod="http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSendUsingPort=2
Const cdoSMTPServer="http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPort="http://schemas.microsoft.com/cdo/configuration/smtpserverport"
Const cdoSMTPConnectionTimeout="http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
Const cdoSMTPAuthenticate="http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
Const cdoBasic=1
Const cdoSendUserName="http://schemas.microsoft.com/cdo/configuration/sendusername"
Const cdoSendPassword="http://schemas.microsoft.com/cdo/configuration/sendpassword"

Dim objConfig ' As CDO.Configuration
Dim objMessage ' As CDO.Message
Dim Fields ' As ADODB.Fields

Set objConfig = Server.CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields


With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "smtp.163.com" '外部邮件服务器域名
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPConnectionTimeout) = 10
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSendUserName) = "XXXXXX" '用户名
.Item(cdoSendPassword) = "XXXXXXX" '密码
.Update
End With

Set objMessage = Server.CreateObject("CDO.Message")
Set objMessage.Configuration = objConfig

With objMessage
.To = request("address")
.From = "XXXXXXX@163.com" '
.Subject = "标题"
.HTMLBody = request("content")正文
.Send
End With

Set Fields = Nothing
Set objMessage = Nothing
Set objConfig = Nothing

response.Write"<script>alert('邮件发送成功');window.location='index.asp';</script>"
response.End
end if

搜索更多相关主题的帖子: 源代码 邮件 Const cdo 
2006-11-15 09:54



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-103083-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.286643 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved