分享

写回答

发帖

[提问] 服务器上CDO.Message这个组件问题

GoDaddy GoDaddy 3150 人阅读 | 16 人回复

发表于 2010-12-6 16:11:44 | 显示全部楼层 |阅读模式

服务器上CDO.Message这个组件问题,邮件发送不了,求高手解!!!
服务器上CDO.Message这个组件问题,邮件发送不了,求高手解!!!
服务器上CDO.Message这个组件问题,邮件发送不了,求高手解!!!

回答|共 16 个

add.c

发表于 2010-12-6 16:19:12 | 显示全部楼层

什么错误信息?

13560422100

发表于 2010-12-6 16:22:04 | 显示全部楼层

原帖由 13560422100 于 2010-12-6 04:11 PM 发表
服务器上CDO.Message这个组件问题,邮件发送不了,求高手解!!!
服务器上CDO.Message这个组件问题,邮件发送不了,求高手解!!!
服务器上CDO.Message这个组件问题,邮件发送不了,求高手解!!! ...



提示这个错误
未命名.jpg

13560422100

发表于 2010-12-6 16:28:46 | 显示全部楼层

原帖由 add.c 于 2010-12-6 04:19 PM 发表
什么错误信息?

.


错误信息
未命名.jpg

13560422100

发表于 2010-12-6 16:35:49 | 显示全部楼层

回复 2# 的帖子

http://bbs.idcspy.com/viewthread.php?tid=153962&pid=732686&page=1&extra=page%3D1###
RAKSmart

add.c

发表于 2010-12-6 16:42:05 | 显示全部楼层

把你的代码贴出来看看,
提示不能连接到服务器

13560422100

发表于 2010-12-6 16:44:51 | 显示全部楼层

回复 7# 的帖子

错误代码提示:
CDO.Message.1 ERROR "80040213"
The transport failed to connect to the server
RAKSmart

13560422100

发表于 2010-12-6 17:00:16 | 显示全部楼层

原帖由 add.c 于 2010-12-6 04:42 PM 发表
把你的代码贴出来看看,
提示不能连接到服务器

回复 7# 的帖子
错误代码提示:
CDO.Message.1 ERROR "80040213"
The transport failed to connect to the server

add.c

发表于 2010-12-6 17:08:35 | 显示全部楼层

这个是示例代码
  1. <%
  2. sendUrl="http://schemas.microsoft.com/cdo/configuration/sendusing"
  3. smtpUrl="http://schemas.microsoft.com/cdo/configuration/smtpserver"


  4. ' Set the mail server configuration
  5. Set objConfig=CreateObject("CDO.Configuration")
  6. objConfig.Fields.Item(sendUrl)=2 ' cdoSendUsingPort
  7. objConfig.Fields.Item(smtpUrl)="relay-hosting.secureserver.net"
  8. objConfig.Fields.Update


  9. ' Create and send the mail
  10. Set objMail=CreateObject("CDO.Message")
  11. ' Use the config object created above
  12. Set objMail.Configuration=objConfig
  13. objMail.From="sender@coolexample.com"
  14. objMail.ReplyTo="sender@coolexample.com"
  15. objMail.To="recipient@coolexample.com"
  16. objMail.Subject="subject"
  17. objMail.TextBody="body"
  18. objMail.Send
  19. %>
复制代码

13560422100

发表于 2010-12-6 17:14:24 | 显示全部楼层

回复 10# 的帖子

Set objMail = Server.CreateObject("CDO.Message")
Set objConfig = Server.CreateObject ("CDO.Configuration")
objConfig.Fields(" http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objConfig.Fields(" http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objConfig.Fields(" http://schemas.microsoft.com/cdo/configuration/smtpserver") = E_Server
objConfig.Fields(" http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objConfig.Fields(" http://schemas.microsoft.com/cdo/configuration/sendusername") = E_ServerUser
objConfig.Fields(" http://schemas.microsoft.com/cdo/configuration/sendpassword") = E_ServerPass
objConfig.Fields(" http://schemas.microsoft.com/cdo/configuration/languagecode") = "0x0804"
objConfig.Fields.Update()
Set objMail.Configuration = objConfig
objMail.Subject = topic
objMail.From = E_SendManMail
objMail.To = email
objMail.HTMLBody = mailbody
objMail.Send
Set objMail = Nothing
您需要登录后才可以回帖 登录 | 注册

本版积分规则