CDONTS, Windows XP and Windows 2000

If you have a lot of ASP code which currently runs on a Windows 2000 server, you probably use CDONTS to send your mail...Now, if you want to migrate to Windows 2003 (or Windows XP for local dev) you'll have a problem - CDONTS no longer comes with those environments...
Luckily CDONTS still works, you just have to hunt down a file called CDONTS.dll in the system32 directory of your Win 2000 box, copy it to your 2003 box and register it...your old code will then work (though CDOSYS is better!)

Print | posted @ Wednesday, October 15, 2003 9:01 PM

Comments on this entry:

Gravatar # re: CDONTS, Windows Server 2003
by shankar.k.narayanan at 7/21/2004 12:26 PM

hi,
i am using asp server object cdonts in windows 2000.in my client machine, he have windows server 2003, it is possible to use this dll in windows server 2003. please do the needful to me.
advance thanks
Gravatar # re: CDONTS, Windows XP and Windows 2000
by Barry at 8/4/2004 6:33 PM

I have installed and registered the CDONTS.dll file and get a permission denied at the Mail.Send line; I used to get this repeatedly with certain (not all, just certain) applications at my former work place on a dev box. I tried the MS famous apply permissions to the IUSR, yada yada, yada on all the subfolders of the mailroot directory and everywhere else and nothing ever worked. Any ideas?
Gravatar # re: CDONTS, Windows XP and Windows 2000
by Scott Galloway at 8/4/2004 9:25 PM

You'd have to give permissions to the ASP.NET account (ASPNET for IIS5, Network Service for IIS 6.0). Alternatively, try to make sure that your SMTP server can send mail (so you've set the server IP correctly) and the mail address you're trying to send to is real...
Gravatar # re: CDONTS, Windows XP and Windows 2000
by rajesh goutam at 9/13/2004 5:45 AM

where i found the cdonts.dll for using cdonts command in ASP form
pl. tell me
Gravatar # re: CDONTS, Windows XP and Windows 2000
by Johnnyboyleeds at 10/14/2004 12:27 AM

Don't bother with CDONTS. It is a very old peice of technology.

Windows 2000,XP,2003 come with CDOsys.

This is much better. you don't need an SMTP virtual server on your web server. You just need access to an SMTP server.
Gravatar # re: CDONTS, Windows XP and Windows 2000
by Scott Galloway at 10/14/2004 1:17 PM

Absolutely true - point of the post was if you have existing ASP applications which you really don't wqant to tough which use CDONTs - then that's the way to get them working again...
Gravatar # CDONTS, Windows XP and Windows 2000
by hussein at 10/24/2004 11:47 AM

hi, thank u for ur useful website. i have problem, if u can help me please. i am using CDONTS in my Server 2003, and i got in the begining an error message and i solve it .(the problem was registeration of CDONTS) and after that i got the following error:

Microsoft VBScript runtime error '800a0046'
Permission denied
/m12.asp , line 134
the line is : Mailer.send

what do u advise me to solve this problem.
my email: hussein@tawam-hosp.gov.ae

thankx
Gravatar # re: CDONTS, Windows XP and Windows 2000
by Teja at 12/3/2004 6:32 AM

Hi, i have a problem. i am using XP pro. IIS5.0 configured. iam able to send/recieve mails from my outlook express. i have mail server . i.e., mail.sol.net.in. i want to send mail from asp page. i am using cdosys.dll. this is my code.

<%
Dim ReferenceID
ReferenceID = 1
Dim MyMail
Set MyMail = Server.CreateObject("CDO.Message")
MyMail.From = "brennand@ccc-ctc.com"
MyMail.To = "brennand@ccc-ctc.com"
MyMail.Subject = "Sending Mail via CDOSYS for Windows 2000/XP"
MyMail.TextBody = "Sending email with CDOSYS Message " &_
"objects is easy! Try it!"
MyMail.Fields.Update()
MyMail.Send()
Set MyMail = Nothing
%>

what's wrong withmy code.
please advice.
Regards.
Teja.
Gravatar # re: CDONTS, Windows XP and Windows 2000
by Scott Galloway at 12/3/2004 11:42 AM

What error are you getting. Is the SMTP server running on the local machine, if you want to send using your mail server and not the local machine you need a bit more stuff e.g.,
<%
' send by connecting to port 25 of the SMTP server
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML
Dim strSmartHost

Const cdoSendUsingPort = 2
StrSmartHost = "mail.example.com"

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

Set Flds = iConf.Fields

' set the CDOSYS configuration fields to use port 25 on the SMTP server

With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
.Update
End With

' build HTML for message body
strHTML = "<HTML>"
strHTML = strHTML & "<HEAD>"
strHTML = strHTML & "<BODY>"
strHTML = strHTML & "<b> This is the test HTML message body</b></br>"
strHTML = strHTML & "</BODY>"
strHTML = strHTML & "</HTML>"

' apply the settings to the message
With iMsg
Set .Configuration = iConf
.To = "nrnoble@example.com"
.From = "nrnoble@example.com"
.Subject = "This is a test CDOSYS message (Sent via Port 25)"
.HTMLBody = strHTML
.Send
End With

' cleanup of variables
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

%>
Gravatar # re: CDONTS, Windows XP and Windows 2000
by tj at 12/7/2004 9:35 AM

We did a test on cdosys..

START: 12/7/2004 9:06:48 AM
Finish: 12/7/2004 9:07:43 AM

..Fast~!

Why does it take so long?

Gravatar # re: CDONTS, Windows XP and Windows 2000
by Scott Galloway at 12/7/2004 11:12 AM

Tj - really need more detail! What took so olong, what was the test? Is that for first send / multiples, does the emmail address exists etc...
Gravatar # re: CDONTS, Windows XP and Windows 2000
by jh at 1/21/2005 11:37 PM

If it is your first time using it in a long time, the component does have to be loaded. CDONTS was probably already in system cache and CDOSYS had to be initialized.

That is what I have found.
Gravatar # Fun and not-so-fun
by at 6/22/2005 6:25 PM

Last night&#8217;s fun trick? Say hello to decafbot! I turned an IRC Infobot into an AIM chatbot via Bitlbee. It may or may not be online depending on how stable the rig is and how tolerant AIM&#8217;s flood/spam triggers...

Your comment:

Title:
Name:
Email:
Website:
 
Italic Underline Blockquote Hyperlink
 
 
Please add 3 and 2 and type the answer here: