CDO.Message.1错误'80040220' [英] CDO.Message.1 error '80040220'
本文介绍了CDO.Message.1错误'80040220'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经托管了我的网站,而发送邮件却给我以下错误:
I have hosted my site, while sending mail gives me error as below:
CDO.Message.1错误'80040220' "SendUsing"配置值无效. /contact.asp,第131行
CDO.Message.1 error '80040220' The "SendUsing" configuration value is invalid. /contact.asp, line 131
我有以下代码:
<%
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort
.Item(sch & "smtpserver") = "<my-smtp-port>"
.Item(sch & "smtpserverport") = 25
.update
End With
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "fromemail"
.To = "toemail"
.Subject = "abc"
.TextBody = "hello"
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>
请帮助我如何解决此查询?...
Please help me how to resolve this query?...
推荐答案
我找到了解决方案.我引用此链接 http://forums .iis.net ,并获得了准确的代码,并替换为发送文本e -使用远程服务器的邮件:.下面是使用的代码:
I got the solution. I refer this link http://forums.iis.net and got exact code and replace with the code given in Sending a text e-mail using a remote server:. Below is code is used:
<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail@mydomain.com"
myMail.To="someone@somedomain.com"
myMail.TextBody="This is a message."
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.server.com"
'Server port
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
myMail.Configuration.Fields.Update
myMail.Send
set myMail=nothing
%>
这篇关于CDO.Message.1错误'80040220'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文