|
 |
asp_cdo thread: CDONTS vs. CDOSYS.
Message #1 by "David Vonderhaar" <vahnid@h...> on Wed, 17 Oct 2001 02:42:26
|
|
Hiya,
I have a couple of Win 2000 5.00.2195 servers (SP2).
I've been trying to get CDONTS and/or CDOSYS to work correctly.
* Server #1* CDONTS works great with the the following code:
---
<%
Option Explicit
Dim objNewMail
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
objNewMail.From = "webmaster@d..."
objNewMail.To = "vahnid@h..."
objNewMail.Subject = "This is a test Mail"
objNewMail.Body = "This is the Body text of this test mail."
objNewMail.Send
Set objNewMail = Nothing
Response.Write "Email has been sent"
%>
---
But the CDOSYS, does not (beware of wrap)
--
<!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library" -->
<!--METADATA TYPE="typelib" UUID="00000205-0000-0010-8000-00AA006D2EA4"
NAME="ADODB Type Library" -->
<%
Set objConfiguration = CreateObject("CDO.Configuration")
Set objFields = objConfiguration.Fields
With objFields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPServer) = "myservername.mydomain.com"
.Update
End With
Set objMessage = CreateObject("CDO.Message")
With objMessage
Set .Configuration = objConfiguration
.From = "me@m..."
.To = "vahnid@h..."
.Subject = "Here comes a Subject"
.TextBody = "Here is a text body"
.Send
End With
set objMessage = nothing
set objFields = nothing
%>
---
* Server #2 * CDONTS does not work, but CDOSYS does.
The CDONTS error message on Server #2 is
--
error '80090020'
An internal error occurred.
/hackmail.asp, line 12
--
Where line 12 is objNewMail.Send
I should tell you some other things that may help?
-Both machines are running the SMTP server just fine. If you drop an
appoporiatly formated text message in the DROP folder it will fire off the
mail.
-I should tell you that Server #1 is under my desk, at home. It has no
port restrictions and a static ip. About as simple as it gets really.
-Machine #2 is at work. It (obviously) as a Smarthost and the name of
that host is not myexample.mydomain.com
-Server 2 has the SMTP server installed "later" than the baseline OS and
IIS server. Server 1 had them installed at the same time.
-I really need this to work on Server 2, which is the real development
box. Server 1 is a toy.
-Most of my research says, "permission problem." But, I've gone and
gave "Everyone" Full Control on server 2.
-I've never done anything with CDOSYS, so pardon any rookie mistakes.
-I've read conflicting information about where and when CDONTS works
on NT2000. Some say yes, some say no. It's all over the map. Some say
it depends on the order things were installed.
-Other people have the "it works on this box, but not this box" syndrom as
well.
-Neither machine has Exchange Server.
-I know about as much as one guy can read in a full day (and not much
more). But my current guess is this has something to do with which .DLL
is registered and which is not.
So you'd think I'd be happy because it's working enough to do what I need
to do. Bonus: _I_ don't have to run the SMTP on the production web
servers as long as the SMTP host is up. (Which I better be sure the SMTP
admin is cool with!)
But after a full day I have not been able to figure out why CDONTS doesn't
work on Server #2. (I don't really care that CDOSYS does not work on
Server #1 since I only brought it up to try this out somewhere other than
development box I was working on.)
Your guidance appreciated!
/djv
Message #2 by "Siegfried Weber" <sweber@c...> on Wed, 17 Oct 2001 04:35:34 +0200
|
|
Inline...
<Siegfried />
> -----Original Message-----
> -Server 2 has the SMTP server installed "later" than the baseline OS
and
> IIS server.
In this case reapply Windows 2000 SP2 and make sure to apply the latest
security hotfixes also. http://www.cdolive.net/download has a file
called Hotfixinstalltion-postSP2.zip which gives you a pointer which
fixes need to be installed. Actually this .ZIP file includes a .CMD
which you can use, given you have downloaded all the files mentioned in
the .CMD file, to deploy those hotfixes in one step.
> Server 1 had them installed at the same time.
I guess before applying Windows 2000 SP2 and the latest hotfixes. That
might be the difference.
> -I've read conflicting information about where and when CDONTS works
> on NT2000. Some say yes, some say no.
Both are true. CDONTS works only on: Windows 2000 Server and Advanced
Server but NOT on Windows 2000 Professional. While CDOSYS works on all
Windows 2000 & Windows XP/.NET Server platforms.
> Some say it depends on the order things were installed.
That was the case with NT4 and the IIS4 Option Pack in relation with
Exchange 5.5 only.
> But after a full day I have not been able to figure out why CDONTS
doesn't
> work on Server #2. (I don't really care that CDOSYS does not work on
> Server #1 since I only brought it up to try this out somewhere other
than
> development box I was working on.)
FWIW: Since CDONTS will be phased out with Windows XP/.NET Server (the
successor of Windows 2000 Server/Advanced Server & Professional) I'd go
with CDOSYS as soon as possible.
Message #3 by "David Vonderhaar" <vahnid@h...> on Wed, 17 Oct 2001 18:14:13
|
|
Hello, and thanks for your help!
> In this case reapply Windows 2000 SP2 and make sure to apply the latest
> security hotfixes also. http://www.cdolive.net/download has a file
<snip>
When sharing your information with the system admin, it felt neat to
say, "the guy who wrote the book (literally) on CDO" said ....
> I guess before applying Windows 2000 SP2 and the latest hotfixes. That
> might be the difference.
The system admin did reapply SP2 right after he added the SMTP service.
We're going to check out the pointers from the CDOLIVE download page and
compare.
We did find some odd permission problems early in the debug process
yesterday. (Side note: I like the Unix file permision model such much
easier to understand.) Perhaps something happened during the SP2 re-
install that we didn't catch the first time around.
Not that it matters much since...
> I'd go with CDOSYS as soon as possible.
Cool, thanks. I hope to learn how to use CDOSYS with a local SMTP server
today. I found lots of information on CDONTS, but little on CDOSYS. Time
to buy a certain book, me thinks!
Thanks again. I'll post an update for the records if we figure it out.
/djv
Message #4 by "Siegfried Weber" <sweber@c...> on Wed, 17 Oct 2001 21:08:33 +0200
|
|
> -----Original Message-----
<snip>
> Cool, thanks. I hope to learn how to use CDOSYS with a local SMTP
server
> today. I found lots of information on CDONTS, but little on CDOSYS.
MSDN has some code which should get you started. Also the list archive
might have some I posted here some months ago.
> Time to buy a certain book, me thinks!
<hint> There will be a new Website soon which will have quite a bit
CDOSYS stuff. More will be announced within the next ten days on
www.cdolive.com </hint>
<Siegfried />
|
|
 |