Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Local CDONTS does not work 2

Status
Not open for further replies.

Madere

Technical User
Apr 14, 2003
85
GB
Hi.

I have a question about CDONTS.
I have Windows XP, XP SP1 and IIS 5.1 installed.
From a page I want to send an email after a form has been completed. When the page is on my providers server, it works fine.
But I want to test the page from my local machine.
Does anyone have an idea why CDONTS does not work?
The error is:
Error Type:
Server object, ASP 0177 (0x800401F3)
Invalid class string
J:\INETPUB\ line 56

The code on line 56 is:
Set ObjMail = Server.CreateObject("CDONTS.NewMail")

So it has something to do with the creation of the CDONTS object.
Do I have to install something more for the use of CDONTS?

Regards,
Maderere.
 
Do you have the SMTP service running on your machine?

Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
Yes,

the SMTP service is running.

Madere.
 
I'm not sure what the error is but I can give you a few trouble shooting tips on this.

1.) Make sure the cdonts.dll is installed. You can check by doing a search on your computer.

2.) Make sure SMTP is running on the server.

3.) Is your code correct? Below is a code what it shoud look like in ASP.

Set objNewMail = server.CreateObject("CDONTS.NewMail")
With objNewMail
.From = "someone@somedomain.com"
.To = "GOINGTOsomeone@somedomain.com"
.CC = "CARBONCOPYsomeone@somedomain.com"
.Subject = "This will appear in the subject line"
.Importance = "Priority level of low,medium,high"
.Body = "The mail message is inside here"
.Send
Set objNewMail = Nothing

I hope that helped.
 
Madhouse,

as I mentioned in my question: the same page on my providers server works fine ==> the script is OK.
In a reply I mentioned that SMTP is running.

New:
cdonts.dll is in my intepub\ directory.

Madere.
 
cdonts is not installed by default with Windows XP, the fact that you have it on your machine at all makes me think you moved it there from an older machine, which would mean it is not entirely compatible. CDONTS was only included on Windows 2000 to make Windows NT scripts continue to work while we, the developing community, slowly stop using it and moved to CDOSYS.
CDOSYS is included with Windows XP, and in fact has greater functionality than CDONTS. I have also seen some problems recently with attempting to send mail through certain mail servers when using CDONTS, a problem that disappears when I move to CDOSYS.

-Tarwn

01010100 01101001 01100101 01110010 01101110 01101111 01101011 00101110 01100011 01101111 01101101
29 3K 10 3D 3L 3J 3K 10 32 35 10 3E 39 33 35 10 3K 3F 10 38 31 3M 35 10 36 3I 35 35 10 3K 39 3D 35 10 1Q 19
Get better results for your questions: faq333-2924
Frequently Asked ASP Questions: faq333-3048
 
Tarwn,

thanks.
I already found this change on a webpage.
Then the question is:
is there a way to find out which OS is installed so I can use the correct object?
Local: XP
Provider: NT

Madere.
 
You could look at the Request.ServerVariables("SERVER_SOFTWARE") value, that will tell you which version of IIS is installed.

Also, if you mean NT as in NT4, you will probably be stuck with CDONTS, I don't know if they made a version of CDOSYS that works on it. Windows 2000 has both CDONTS and CDOSYS. XP, as I mentione above, only has CDOSYS.

-Tarwn

01010100 01101001 01100101 01110010 01101110 01101111 01101011 00101110 01100011 01101111 01101101
29 3K 10 3D 3L 3J 3K 10 32 35 10 3E 39 33 35 10 3K 3F 10 38 31 3M 35 10 36 3I 35 35 10 3K 39 3D 35 10 1Q 19
Get better results for your questions: faq333-2924
Frequently Asked ASP Questions: faq333-3048
 
Tarwn,

thanks for the info.

Madere.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top