51Testing软件测试论坛
标题:
请教问题,大家帮帮我这个新手哈
[打印本页]
作者:
kitomi
时间:
2009-1-16 10:49
标题:
请教问题,大家帮帮我这个新手哈
我想写一VBS把QTP的报告发送到邮箱里面,VBS的程序具体如下:
set objEmail = CreateObject("CDO.Message")
objEmail.From = myemail
objEmail.To = a_email
objEmail.cc = myemail
objEmail.Subject = mailtitle
objEmail.Textbody = mailbody
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtphost"
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username"
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
objEmail.Configuration.Fields.Update
objEmail.Send
Set objEmail=Nothing
但是每次我运行的时候都会报错,错误如下:
Error:The transport failed to connect to the server.
Code: 80040213
Source: CDO.Message.1
不知道出了什么问题啊,请各位指教啊,程序应该是没问题的,就是不知道是不是什么地方出错了,
我还装了IIS,vbscript.dll也正确的注册过了,各位帮帮我哈~~谢谢先~~
作者:
dreamever
时间:
2009-1-16 11:17
非2003系统注册一下cdosys.dll,先试试吧,暂时先想到了这个原因
作者:
sterson
时间:
2009-1-16 12:58
CDO.Message这个组件好象只能向企业邮箱里发信,不能向免费的邮箱里发信,比如163,126,21cn,sohu,yahoo等邮箱都是收不到的..
The transport failed to connect to the server,就是链接不上服务器.
作者:
kitomi
时间:
2009-1-17 08:53
标题:
回复 2# 的帖子
这个我注册过了~~还是不行~~
作者:
kitomi
时间:
2009-1-17 08:54
标题:
回复 3# 的帖子
我就是在企业内部的邮箱发送邮件,不向外部发~~
谢谢,请指教~~
作者:
kitomi
时间:
2009-1-17 10:33
已经解决了,是邮件服务器的问题,呵呵~~谢谢大家~~
作者:
liujin230124
时间:
2010-1-6 09:38
请问是如何解决的呢?
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2