Forum Moderators: mack

Message Too Old, No Replies

Cdonts

help with CDONTS in ASP

         

Shuvi

6:56 pm on Dec 18, 2003 (gmt 0)

10+ Year Member



Here's my code and it's not working

Dim MyBody
Dim MyCDONTSMail

Set MyCDONTSMail = Server.CreateObject("CDONTS.NewMail")
MyCDONTSMail.From= "admin@company.com"
MyCDONTSMail.To= "testperson@company.com"
MyCDONTSMail.Subject="Password Confirmation"
MyBody = "You have successfully changed your password." & vbCrLf
MyBody = MyBody & "Your new password is "
' & Password & "'"& vbCrLf
MyCDONTSMail.Body= MyBody
MyCDONTSMail.Send
set MyCDONTSMail = nothing

What am I doing wrong? This code is still in development hence it's still in my c drive in IIS. Can it stil work or do I have to put it on a server?

TheSeoGuy

4:54 pm on Dec 19, 2003 (gmt 0)

10+ Year Member



I believe that CDONTS is a component that is installed on the web server after installing the SMTP service. So, if you are using LOCALHOST for development purposes, which it sounds like you are, the mail probably will not work unless you also have the CDONTS component installed. If you have your hosting set up, I would post the page to the site and see if it runs correctly. Hope this helps.

Shuvi

5:01 pm on Dec 19, 2003 (gmt 0)

10+ Year Member



That's exactly what I did and got an error "Permission Denied"

TheSeoGuy

5:21 pm on Dec 19, 2003 (gmt 0)

10+ Year Member



You may want to contact you hosting company and make sure the IUSER account has the correct permissions to run the mail component.

mattur

7:11 pm on Dec 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Many ASP hosts turn off the cdonts object, and use a different email object like jmail or aspemail. Check your hosts docs to find out what they support for sending email...