satj2000
asked on
IIS CDONTS problem
My CDONTS component seems not to work for some reasons. When I try to use the Server.CreateObject in an asp page, I get an error telling me that the CDONTS object was not found. Please let me know how I can solve the problem. I reinstalled the IIS but had no luck!
Thanks,
Ameen.
Thanks,
Ameen.
ASKER
where is cdonts.dll located?
Try searching for it. I've forgotten it.
hongjun
hongjun
ASKER
It can't be found on my hard drive!!! Can you send yours to me?? email: sameenj@yahoo.com
cdonts is on windows servers only..
search for the file from the SERVER harddisk.
hongjun
hongjun
ASKER
My Computer is the server at the same time, I have IIS on it, the problem is that the CDONTS is not there and that is why I cannot use the CDONTS component in my ASP pages. I need the file, can anyone send it to me? or tell me how to install it on my system? Is reinstalling the IIS going to install it?
Even if someone sent you the file, I don't know that will solve your problem. I think that there are some additional necessary files. Take a look at MS Knowledgebase for details.
BTW, what operating system are you running?
Fritz the Blank
BTW, what operating system are you running?
Fritz the Blank
ASKER
Windows XP with IIS 5.1
CDONTS does not come with Windows XP. Try using Persits free ASPEmail available for free at www.aspemail.com. It works fine with XP, and I have found it to be much more reliable than CDO/CDONTS.
Fritz the Blank
Fritz the Blank
don't use CDONTS, use CDO ~ it's the latest and greatest version. they replaced CDONTS with CDO on Windows 2000, but kept CDONTS for backwards compatability.. I guess they removed it for XP.
worx ASP 3.0 book has a good section on CDO
Cheers
worx ASP 3.0 book has a good section on CDO
Cheers
Which type of XP you are using? Professional?Home?
ASKER
Professional
Anyway to get CDO or CDONTS on my machine?
Anyway to get CDO or CDONTS on my machine?
Have you install the SMTP service to your machine?
ASKER
Yes, I did, the CDONTS component is simply not there... I also tried reinstalling the IIS, but had no luck
Not to repeat myself, but CDONTS does not come with XP, even if you install IIS.
Either use CDO or the Persits ASPeMail that I mentioned above.
Fritz the Blank
Either use CDO or the Persits ASPeMail that I mentioned above.
Fritz the Blank
ASKER
How can I use CDO then?
Can you send me a sample code?
Thanks.
Can you send me a sample code?
Thanks.
ASKER
How do I create an instance of the object?
set bla=server.createobject("C DO.NewMail ") ???
set bla=server.createobject("C
<%
Set objMessage = Server.CreateObject("CDO.M essage")
objMessage.To = strToAddress
objMessage.From = strFromAddress
objMessage.Subject = "Your subject goes here..."
objMessage.TextBody = "This is your message text."
objMessage.Send
Set objMessage = Nothing
%>
Set objMessage = Server.CreateObject("CDO.M
objMessage.To = strToAddress
objMessage.From = strFromAddress
objMessage.Subject = "Your subject goes here..."
objMessage.TextBody = "This is your message text."
objMessage.Send
Set objMessage = Nothing
%>
ASKER
Hello Fritz,<br>
Thanks for your reply, this is actually what I needed. However when I try to send an email using the code you provided I get the following error. Note that I replaced the .From and .To properties with valid values:
Technical Information (for support personnel)
Error Type:
CDO.Message.1 (0x80040220)
The "SendUsing" configuration value is invalid.
/test.asp, line 7
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET CLR 1.0.3705)
I looked up the MSDN documentation and the component has no SendUsing property! so I am confused, may be you know what is wrong?!?!?!
Thanks for your reply, this is actually what I needed. However when I try to send an email using the code you provided I get the following error. Note that I replaced the .From and .To properties with valid values:
Technical Information (for support personnel)
Error Type:
CDO.Message.1 (0x80040220)
The "SendUsing" configuration value is invalid.
/test.asp, line 7
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET CLR 1.0.3705)
I looked up the MSDN documentation and the component has no SendUsing property! so I am confused, may be you know what is wrong?!?!?!
ASKER
Please note that line 7 is the place where the .send method gets invoked...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Now I know this is for Win 2K, but I always include this in my global.asa file when I'm trying to do CDO using ASP.
<!-- METADATA type="typelib" name="CDO for Windows 2000 Type Library" uuid="CD000000-8B95-11D1-8 2DB-00C04F B1625D" -->
I could be wrong, but I think you need that when you try to use CDO ~ it creates the reference to the dll.
Hope that helps
<!-- METADATA type="typelib" name="CDO for Windows 2000 Type Library" uuid="CD000000-8B95-11D1-8
I could be wrong, but I think you need that when you try to use CDO ~ it creates the reference to the dll.
Hope that helps
Here is another example I found with the configuration code. You'll need to change the SMTP service to match yours.
DIM iMsg, Flds, iConf
Set iMsg = CreateObject("CDO.Message" )
Set iConf = CreateObject("CDO.Configur ation")
Set Flds = iConf.Fields
Flds(cdoSendUsingMethod) = cdoSendUsingPort
Flds(cdoSMTPServer) = "127.0.0.1"
Flds(cdoSMTPServerPort) = 25
Flds(cdoSMTPAuthenticate) = cdoAnonymous ' 0
Flds.Update
With iMsg
Set .Configuration = iConf
.To = "paul@gregoire.org"
.From = sFrom
.Sender = "form@mydomain.com"
.Subject = "Form Output"
.TextBody = "" & sBody & ""
.Send
End With
%>
DIM iMsg, Flds, iConf
Set iMsg = CreateObject("CDO.Message"
Set iConf = CreateObject("CDO.Configur
Set Flds = iConf.Fields
Flds(cdoSendUsingMethod) = cdoSendUsingPort
Flds(cdoSMTPServer) = "127.0.0.1"
Flds(cdoSMTPServerPort) = 25
Flds(cdoSMTPAuthenticate) = cdoAnonymous ' 0
Flds.Update
With iMsg
Set .Configuration = iConf
.To = "paul@gregoire.org"
.From = sFrom
.Sender = "form@mydomain.com"
.Subject = "Form Output"
.TextBody = "" & sBody & ""
.Send
End With
%>
Try to register cdonts.dll manually yourself by doing the following in Start->Run.
regsvr c:\...\cdonts.dll
hongjun