CDONTS and Windows Server 2003

B

Boris

Could someone please tell me if I can use CDONTS in W 2003 Server environment to send emails the same way it is used in W2K Server. I have heard that CDONTS is no longer available in W 2003 Server and if so, how can I send emails from ASP page...
Many thanks in advance
 
A

Alan Howard

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

You can register the CDONTS DLL manually but consider migrating your code to
CDO.

Alan


Boris said:
Could someone please tell me if I can use CDONTS in W 2003 Server
environment to send emails the same way it is used in W2K Server. I have
heard that CDONTS is no longer available in W 2003 Server and if so, how can
I send emails from ASP page...
 
B

Bullschmidt

CDO is generally used instead of CDONTS on IIS 5 and after (actually the
SMTP service within IIS) which is generally on servers after Win NT4
(although I think CDONTS is generally still supported too).

Here are changes I made to convert CDONTS stuff to be CDO stuff instead:

o Change objCDONTS to be called objCDO (actually this is just a cosmetic
change)

o This:
Set objCDONTS = Server.CreateObject("CDONTS.NewMail")

Changed to this instead:
Set objCDO = Server.CreateObject("CDO.Message")

o This:
objCDONTS.Body = strEmailBody

Changed to this instead:
objCDO.TextBody = strEmailBody

o This removed:
' Importance.
' (0=Low, 1=Normal, 2=High)
objCDONTS.Importance = 1

Best regards,
J. Paul Schmidt, Freelance ASP Web Designer
http://www.Bullschmidt.com
ASP Designer Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
D

Dave Anderson

Bullschmidt said:
Here are changes I made to convert CDONTS stuff to be CDO stuff
instead...

When we ported to CDO, this was all we had to do -- on some of our servers.
As we set about remediating scripts, we discovered that this simply did not
work on all of our servers. We needed to explicitly specify the
configuration on those servers, even when using the pickup directory.
Example:

var Msg = Server.CreateObject("CDO.Message"),
Config = Server.CreateObject("CDO.Configuration")

Config.Fields.Item(cdoSendUsingMethod) = cdoSendUsingPickup
Config.Fields.Item(cdoSMTPServerPickupDirectory) = cdoPickupDirectory
Config.Fields.Update()
Msg.Configuration = Config



We never took the time to track down the differences between servers that
was causing this, instead opting for the explicit declaration, which leaves
no ambiguity.



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
A

Alan Howard

Config.Fields.Item(cdoSMTPServerPickupDirectory) = cdoPickupDirectory

I might have to follow this up myself :) I've just been through the process
of migrating an app from CDONTS to CDO and noticed a 'must specify location
of the Pickup directory' error when running the new email component in local
mode on one of my XP development workstations. Same component works fine on
my Win2000 workstations and staging servers. Thanks for that.

Alan
 
A

Aaron [SQL Server MVP]

I found CDONT.Dlll file or same names like that CDons.dll . YOu have to
find
those files in ur Windows System then simple put that in ur System32 and
Register it i am sure your CDONTs mail ll start for sure.

NO, NO, NO! Did you stop to think that maybe CDONTS is not included in
Windows 2003 for a reason? What is wrong with using CDO.Message instead?
 
K

Kaustubh Gujar

Well
I too got same problem .
I found CDONT.Dlll file or same names like that CDons.dll . YOu have to find
those files in ur Windows System then simple put that in ur System32 and
Register it i am sure your CDONTs mail ll start for sure.

Here the that how to register cdonts.dll
regsvr32 Cdonts.dll
Type this command in run and you ll be Out of problemf or sure ;)

You may send the CDONTS mail now !

Kaustubh

Boris said:
Could someone please tell me if I can use CDONTS in W 2003 Server
environment to send emails the same way it is used in W2K Server. I have
heard that CDONTS is no longer available in W 2003 Server and if so, how can
I send emails from ASP page...
 
J

Jeff Cochran

Stop it! CDONTS has been deprecated and removed from current versions
on purpose. Use CDO. That's what it exists for.

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top