...

View Full Version : Cdonts Error



ahmedsoliman
02-19-2003, 08:40 PM
i created email processing asp file and run it under iis ver5.01 and win xp ,it give me this error:

Error Type:
Server object, ASP 0177 (0x800401F3)
Invalid class string
/test/send.asp, line 18

line 18 is :
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")

this is my full code:

<%


Dim strTo
Dim strSubject
Dim strBody 'Strings for recipient, subject, boby
Dim objCDOMail 'The CDO object

strFrom = Request.Form("From") 'Make sure the From field has no spaces.
strTo = Request.Form("to")
strSubject = Request.Form("subject")
strBody = Request.Form("body")

' Create an instance of the NewMail object.
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")

' Set the properties of the object
objCDOMail.From = StrFrom
objCDOMail.To = strTo
objCDOMail.Subject = strSubject
objCDOMail.Body = strBody


objCDOMail.Send


Set objCDOMail = Nothing
%>
<html>
<head><title>Sent Mail</title></head>
<body>
Your mail was sent to:<% = request("to") %><br>
The time that is was sent was: <% = Now %>

</body>
</html>

BigDaddy
02-19-2003, 09:19 PM
On line 17, put in

response.write strFrom : response.end


You probably already di this, but check to see if anything is printed out. See what is printed out from the variable.

ahmedsoliman
02-20-2003, 04:48 AM
it printed strfrom
webmaster@shazly.org

ahmedsoliman
02-21-2003, 03:32 AM
this error massage is refer to the smtp is not installed in iis ,
but it is, so may be the smtp has to be configured, any one know about it.

ahmedsoliman
02-23-2003, 01:29 AM
i found the solution, Unfortunely the CDONTS .DLL was not included in the Windows XP version.

1-dowmload cdonts from: http://crt.doce.lsu.edu/CRT-HTML-Class/cdonts.dll

2-Download CDONTS.DLL into: c:\windows\system32


3-Registor cdonts.dll


4-Go in to DOS (Start->All Programs->Accessories->Command Prompt)


5-Go to the System32 Folder (at the blinking cursor type: CD \windows\system32 and hit [Enter])


6-At the blinking cursor type: RegSvr32 cdonts.dll


Your Done!
thanks for all
:)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum