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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDONTS Error Message

Status
Not open for further replies.

dom24

Programmer
Aug 5, 2004
218
0
0
GB
I'm trying to create an email on submission of a form, but I get the following error. Does anybody know what i'm doing wrong?

Microsoft VBScript runtime error '800a01ad'

ActiveX component can't create object: 'CDONTS.NewMail'

/Evaluation/CDONTSMail.asp, line 48
 
Normally that error indicated that CDONTS isnt installed.Is CDONTS Installed. What system (OS) are you using.
If its XP try the CDO object. CDONTS Is NT and 2000 if need be.

 
I'm using windows 2000. Should it be working then?
I'm not sure what is installed as i'm working from my office. Is there anything else I can try?
 
<%@ LANGUAGE="VBSCRIPT" %>
<HTML>
<HEAD>
<TITLE>CDONTSMail</TITLE>

<%
Sub Write(strWriteThis)
'This subroutine just writes out whatever is
'passed to it.
response.write(strWriteThis & "<br>")
end sub

%>
</HEAD>
<BODY>

<%
Dim myCDONTSMail
Dim strFrom
Dim strTo
Dim strSubject
Dim strMessage
Dim lngImportance


strFrom=request.form("txtFrom")
strTo=request.form("txtTo")
strSubject = request.form("txtSubject")
strBody=request.form("txtMessage")
lngImportance = request.form("optImportance")

'The following four lines of code are just here for test
'purposes to see what variables have been pulled in from the
'HTM form.
Write("strFrom = " & strFrom)
Write("strTo = " & strTo)
Write("strSubject = " & strSubject)
Write("strMessage = " & strBody)
Write("Importance = " & lngImportance)

Set myCDONTSMail = CreateObject("CDONTS.NewMail")

myCDONTSMail.Send strFrom,strTo,strSubject,strBody,lngImportance

Set myCDONTSMail = Nothing
Write "Mail has been sent."
%>
</BODY>
</HTML>
 
Nope, now it says:

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/Evaluation/CDONTSMail.asp, line 44

Invalid class string

Line 44 is the line where i've just added Server to the CreateObject.
 
I think I had this problem before.... You may need to download and register CDONTS.dll(I think from the Internet) - try searching it at Yahoo.... And then register the DLL... using the "run" menu from the Start menu... Ohh!.. before downloading the .dll file.... Try searching for CDONTS.dll on you Windows directory....

Good Luck...

then you are good to go....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top