CDONTS无法在W2000服务器上运行 [英] CDONTS not working on W2000 Server

查看:54
本文介绍了CDONTS无法在W2000服务器上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的W2K3

机器上运行使用CDONTS发送邮件的测试。


它可以从我的WXP Pro运行良好,但我如果

运行W2K3机器,就不会收到邮件。


两台机器的IIS配置基本相同。

************************************************** ****************************************

< %@ LANGUAGE = QUOT; VBSCRIPT" CODEPAGE =" 1252"%>

<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 Transitional // EN"

" http ://www.w3.org/TR/html4/loose.dtd">

< html>

< head>

< meta http-equiv =" Content-Type" content =" text / html;

charset = iso-8859-1">

< title> Untitled Document< / title>

< / head>


< body>


<%

response.write( " Before Request.ServerVariables variable ="&

Request.ServerVariables(" LOCAL_ADDR")&"< br>")

response.write("在Request.ServerVariables variable =&

Request.ServerVariables(" LOCAL_ADDR")&"< br>")


Dim iMsg

昏暗的iConf

Dim Flds

Dim strHTML


Const cdoSendUsingPickup = 1

set iMsg = CreateObject(" CDO.Message")

set iConf = CreateObject(" CDO.Configuration")


设置Flds = iConf.Fields

使用Flds

.Item(" http://schemas.microsoft.com / cdo / configuration / sendusing")

= cdoSen dUsingPickup

''TODO:替换< PICKUP DIRECTORY>通往你的

取件目录

''通常,c:\ Inetpub \ mailroot \ pickup

.Item(" http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory")="C:\Inetpub\mailroot\p ickup"

.Item(" http:// schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.interez.com"

。更新

结束


Dim iBP

with iMsg

Set .Configuration = iConf

.To =" tf*@ftsolutions.com" < br $>
.From =" tf *@ftsolutions.com"

.Subject ="测试页"

.HTMLBody ="这是一个测试页面

'TODO:如果添加附件,

''取消注释下一行并根据需要更改文件路径

''设置iBP = iMsg.AddAttachment(App.Path&" \ file1.txt")

。发送

结束

''清理变量es。

设置iBP = Nothing

设置iMsg = Nothing

设置iConf = Nothing

设置Flds = Nothing


%>

< / body>

< / html>

* ************************************************* ***********************

Exchange中有什么东西可能会给我一个问题。


交换机没有在任何一台机器上运行。


谢谢,


汤姆。

解决方案

您是否尝试过不同的域名(例如:将from和to更改为hotmail

帐户)?
http://www.aspfaq.com/2511


您是否检查过badmail,队列,提取文件夹等?
http://www.aspfaq.com/2254
http://www.aspfaq.com/2268


既然你在配置属性中列出了一个SMTP服务器,你尝试使用cdoSendUsingPort而不是cdoSendUsingPickup吗?


-
http://www.aspfaq.com/

(反向回复地址。)



" tshad" < TS ********** @ ftsolutions.com>在消息中写道

新闻:#v ************* @ TK2MSFTNGP11.phx.gbl ...

我正在尝试运行在我的W2K3
机器上使用CDONTS发送邮件的测试。

从我的WXP Pro运行良好,但如果运行W2K3机器我没有收到邮件


两台机器的IIS配置基本相同。


******************** ****************************** ******************** ******

**************<%@ LANGUAGE =" VBSCRIPT" CODEPAGE =" 1252"%>
<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 Transitional // EN"
" http://www.w3.org /TR/html4/loose.dtd">
< html>
< head>
< meta http-equiv =" Content-Type" content =" text / html;
charset = iso-8859-1">
< title> Untitled Document< / title>
< / head>

< body>

<%
response.write(" Before Request.ServerVariables variable ="&
Request.ServerVariables(" LOCAL_ADDR") )&"< br>")

response.write(在Request.ServerVariables变量="&
Request.ServerVariables(" LOCAL_ADDR")&& ;< br>")

昏暗的iMsg
昏暗的iConf
Dim Flds
Dim strHTML

Const cdoSendUsingPickup = 1

设置iMsg = CreateObject(" CDO.Message")
设置iConf = CreateObject(" CDO.Configuration")

设置Flds = iConf.Fields
使用Flds

..Item(" http://schemas.mi crosoft.com/cdo/configuration/sendusing")= cdoSendUsingPickup
''TODO:替换< PICKUP DIRECTORY>通往你的取件目录的路径
''通常,c:\ Inetpub \ mailroot \ pickup

..Item(" http://schemas.microsoft .com / cdo / configuration / smtpserverpickupdirect

ory")=" C:\ Inetpub \ mailroot \ pickup"
..Item(" http://schemas.microsoft.com/cdo/configuration/smtpserver")=" smtp.int

erez.com" 。更新
结束

昏暗的iBP
使用iMsg
设置.Configuration = iConf
.To =" tf*@ftsolutions.com"
.From =" tf*@ftsolutions.com"
.Subject ="测试页面
.HTMLBody ="这是一个测试页面
''TODO :如果添加附件,则取消注释下一行并根据需要更改文件路径
''设置iBP = iMsg.AddAttachment(App.Path&" \ file1.txt")
。发送
结束

''清理变量。
设置iBP = Nothing
设置iMsg = Nothing
设置iConf = Nothing
设置Flds = Nothing

%>
< / body>
< / html>

************************************************** ************************ Exchange中有什么东西可能会给我一个问题。

Exchange没有运行两台机器。

谢谢,

Tom。



周一,15日2004年11月11:46:26 -0800,tshad

< ts ********** @ ftsolutions.com>写道:

我正在尝试在我的W2K3
机器上运行使用CDONTS发送邮件的测试。

从我的WXP Pro运行正常,但是如果
运行W2K3机器,我就不会收到邮件。


CDONTS在Server 2003上不存在,切换到CDO.Message。请参阅:

http:// www。 aspfaq.com/show.asp?id=2026


当然,下面的代码已经使用了CDO,因此可能不是你的

问题。发布错误消息,检查队列,确保您的系统可以使用

smtp.interez.com等。


Jeff

两台机器的IIS配置基本相同。

****************************** ******************** ****************************** **********
<%@ LANGUAGE =" VBSCRIPT" CODEPAGE =" 1252"%>
<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 Transitional // EN"
" http://www.w3.org /TR/html4/loose.dtd">
< html>
< head>
< meta http-equiv =" Content-Type" content =" text / html;
charset = iso-8859-1">
< title> Untitled Document< / title>
< / head>

< body>

<%
response.write(" Before Request.ServerVariables variable ="&
Request.ServerVariables(" LOCAL_ADDR") )&"< br>")

response.write(在Request.ServerVariables变量="&
Request.ServerVariables(" LOCAL_ADDR")&& ;< br>")

昏暗的iMsg
昏暗的iConf
Dim Flds
Dim strHTML

Const cdoSendUsingPickup = 1

设置iMsg = CreateObject(" CDO.Message")
设置iConf = CreateObject(" CDO.Configuration")

设置Flds = iConf.Fields
使用Flds
.Item(" http://schemas.microsoft .com / cdo / configuration / sendusing")
= cdoSendUsingPickup
''TODO:替换< PICKUP DIRECTORY>通往你的取件目录的路径
''通常,c:\ Inetpub \ mailroot \ pickup
.Item(" http://schemas.microsoft.com/cdo/ configuration / smtpserverpickupdirectory")=" C:\Inetpub\mailroot\p ickup"
.Item(" http://schemas.microsoft.com/cdo/configuration/smtpserver")=" smtp.interez.com"
。更新
结束

Dim iBP
使用iMsg
设置.Configuration = iConf
.To = " tf*@ftsolutions.com"
.from =" tf*@ftsolutions.com"
.Subject ="测试页"
。HTMLLody ="这是一个测试页面
'TODO:如果添加附件,则取消注释下一行并根据需要更改文件路径
''设置iBP = iMsg.AddAttachment(App.Path& " \ file1.txt")
。发送
结束

''清理变量。
设置iBP = Nothing
设置iMsg =什么都没有
设置iConf = Nothing
设置Flds = Nothing

%>
< / body>
< / html>
************************************************** ************************
Exchange中有什么东西可能会给我一个问题。

交换没有在这两台机器上运行。

谢谢,

Tom。




>确保你的系统可以使用smtp.interez.com,


因为他指定了cdoSendUsingPickup,所以我认为这个设置甚至不会是
玩。无论如何,外部SMTP服务器无法从他的

本地提货文件夹中获取邮件......


A

I am trying to run a test sending mail using CDONTS on my W2K3
machine.

It works fine running from my WXP Pro, but I don''t recieve the mail if
run the W2K3 machine.

Both machines have IIS configured essentially the same.
************************************************** ****************************************
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>

<%
response.write("Before Request.ServerVariables variable = " &
Request.ServerVariables("LOCAL_ADDR") & "<br>")

response.write("after Request.ServerVariables variable = " &
Request.ServerVariables("LOCAL_ADDR") & "<br>")

Dim iMsg
Dim iConf
Dim Flds
Dim strHTML

Const cdoSendUsingPickup = 1

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
= cdoSendUsingPickup
'' TODO: Replace <PICKUP DIRECTORY> with path to your
pickup directory
'' Typically, c:\Inetpub\mailroot\pickup
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory")="C:\Inetpub\mailroot\p ickup"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.interez.com"
.Update
End With

Dim iBP
With iMsg
Set .Configuration = iConf
.To = "tf*@ftsolutions.com"
.From = "tf*@ftsolutions.com"
.Subject = "A test page"
.HTMLBody = "This is a test page"
''TODO: if adding an attachment,
''uncomment the next line and alter file path as required
''Set iBP = iMsg.AddAttachment(App.Path & "\file1.txt")
.Send
End With
'' Clean up variables.
Set iBP = Nothing
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

%>
</body>
</html>
************************************************** ************************
Is there something in Exchange that might be giving me a problem.

Exchange is not running on either machine.

Thanks,

Tom.

解决方案

Have you tried different domains (e.g. change the from and to to a hotmail
account)?
http://www.aspfaq.com/2511

Did you check in the badmail, queue, pickup folders, etc?
http://www.aspfaq.com/2254
http://www.aspfaq.com/2268

Since you have an SMTP server listed in the configuration properties, did
you try using cdoSendUsingPort instead cdoSendUsingPickup?

--
http://www.aspfaq.com/
(Reverse address to reply.)


"tshad" <ts**********@ftsolutions.com> wrote in message
news:#v*************@TK2MSFTNGP11.phx.gbl...

I am trying to run a test sending mail using CDONTS on my W2K3
machine.

It works fine running from my WXP Pro, but I don''t recieve the mail if run the W2K3 machine.

Both machines have IIS configured essentially the same.
************************************************** **************************
************** <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>

<%
response.write("Before Request.ServerVariables variable = " &
Request.ServerVariables("LOCAL_ADDR") & "<br>")

response.write("after Request.ServerVariables variable = " &
Request.ServerVariables("LOCAL_ADDR") & "<br>")

Dim iMsg
Dim iConf
Dim Flds
Dim strHTML

Const cdoSendUsingPickup = 1

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields
With Flds
..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPickup
'' TODO: Replace <PICKUP DIRECTORY> with path to your
pickup directory
'' Typically, c:\Inetpub\mailroot\pickup
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirect
ory")="C:\Inetpub\mailroot\pickup" ..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.int
erez.com" .Update
End With

Dim iBP
With iMsg
Set .Configuration = iConf
.To = "tf*@ftsolutions.com"
.From = "tf*@ftsolutions.com"
.Subject = "A test page"
.HTMLBody = "This is a test page"
''TODO: if adding an attachment,
''uncomment the next line and alter file path as required
''Set iBP = iMsg.AddAttachment(App.Path & "\file1.txt")
.Send
End With
'' Clean up variables.
Set iBP = Nothing
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

%>
</body>
</html>
************************************************** ************************ Is there something in Exchange that might be giving me a problem.

Exchange is not running on either machine.

Thanks,

Tom.



On Mon, 15 Nov 2004 11:46:26 -0800, "tshad"
<ts**********@ftsolutions.com> wrote:

I am trying to run a test sending mail using CDONTS on my W2K3
machine.

It works fine running from my WXP Pro, but I don''t recieve the mail if
run the W2K3 machine.
CDONTS doesn''t exist on Server 2003, switch to CDO.Message. See:

http://www.aspfaq.com/show.asp?id=2026

But of course your code below already uses CDO so that may not be your
issue. Post error messages, check the queues, make sure that
smtp.interez.com is available to your system, etc.

Jeff
Both machines have IIS configured essentially the same.
************************************************** ****************************************
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>

<%
response.write("Before Request.ServerVariables variable = " &
Request.ServerVariables("LOCAL_ADDR") & "<br>")

response.write("after Request.ServerVariables variable = " &
Request.ServerVariables("LOCAL_ADDR") & "<br>")

Dim iMsg
Dim iConf
Dim Flds
Dim strHTML

Const cdoSendUsingPickup = 1

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
= cdoSendUsingPickup
'' TODO: Replace <PICKUP DIRECTORY> with path to your
pickup directory
'' Typically, c:\Inetpub\mailroot\pickup
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory")="C:\Inetpub\mailroot\p ickup"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.interez.com"
.Update
End With

Dim iBP
With iMsg
Set .Configuration = iConf
.To = "tf*@ftsolutions.com"
.From = "tf*@ftsolutions.com"
.Subject = "A test page"
.HTMLBody = "This is a test page"
''TODO: if adding an attachment,
''uncomment the next line and alter file path as required
''Set iBP = iMsg.AddAttachment(App.Path & "\file1.txt")
.Send
End With
'' Clean up variables.
Set iBP = Nothing
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

%>
</body>
</html>
************************************************** ************************
Is there something in Exchange that might be giving me a problem.

Exchange is not running on either machine.

Thanks,

Tom.




> make sure that smtp.interez.com is available to your system,

Since he specified cdoSendUsingPickup, I don''t think this setting even comes
into play. An external SMTP server wouldn''t be able to grab mail from his
local pickup folder anyway...

A


这篇关于CDONTS无法在W2000服务器上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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