Why is there an error?

Hi Experts,

Why am I getting this error?

Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied
/intermodal/email.asp, line 56

I am using this script I found:

Dim strTo, strSubject, strBody 'Strings for recipient, subject, body

Dim objCDOMail 'The CDO object

strTo = "lan.ho@chep.com"

' Both of these should be changed before you run this script.
strSubject = "Sample E-mail sent from ASP 101!"

' This is multi-lined simply for readability

strBody = "THIS IS A TEST"

' Create an instance of the NewMail object.

Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
' Set the properties of the object

objCDOMail.From    = "ricky.ng@chep.com"

objCDOMail.To      = strTo
objCDOMail.Subject = strSubject
objCDOMail.Body    = strBody

' There are lots of other properties you can use.
' You can send HTML e-mail, attachments, etc...
' You can also modify most aspects of the message
' like importance, custom headers, ...
' Check the documentation for a full list as well
' as the correct syntax.

' Some of the more useful ones I've included samples of here:
'objCDOMail.Cc         = "user@domain.com;user@domain.com"
'objCDOMail.Bcc        = "user@domain.com;user@domain.com"

objCDOMail.Importance = 1 '(0=Low, 1=Normal, 2=High)

'objCDOMail.AttachFile "c:\path\filename.txt", "filename.txt"

' I've had several requests for how to send HTML email.
' To do so simply set the body format to HTML and then
' compose your body using standard HTML tags.
'objCDOMail.BodyFormat = 0 ' CdoBodyFormatHTML
'Outlook gives you grief unless you also set:
'objCDOMail.MailFormat = 0 ' CdoMailFormatMime

' Send the message!
' Set the object to nothing because it immediately becomes
' invalid after calling the Send method.
Set objCDOMail = Nothing

'Response.Write "Message sent to " & strTo & "!"
Response.Write "Message was sent"


Line 56 is:


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

this may help

just by looking at your code.  It looks like you are trying to attach a file from c:\path, which may not exist.  you may want to consider either getting rid of that line (if you are not trying to attach a file to email you are sending), or put in the correct path (if you are trying to attach a file to the email)
indyngAuthor Commented:

I am not attaching any files. That line has been commented out.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

lol....sorry folks, I'm blind without my morning coffee  :)

@indyng  Definatly check out the links above

CDONTS component is not installed in the server. check with service provider about it
oh so it is already abandoned ? sori for my post then

Collaborative Data Objects (CDO) are installed by default with the installation of windows:
CDONTS for windows 2000, and CDOSYS for windows 2003
randpeeps has the correct answer
actually, cdosys is on both 2000 and 2003.
really now?  I have server 2000 setup at home and it only has CDONTS installed?

WIN2003 - CDOSYS (NO CDOSYS WITH OS. However you can intall CDONTS by copying from Win2k OS and registering it)

>>WIN2003 - CDOSYS (NO CDOSYS WITH OS. However you can intall CDONTS by copying from Win2k OS and registering it)

read as
WIN2003 - CDOSYS (NO CDONTS WITH OS. However you can intall CDONTS by copying from Win2k OS and registering it)

CDOSYS was first available in Windows 2000 Server. As of December 2003, CDOSYS is an integral part of the Windows 2000, Windows XP, and Windows 2003 series of operating systems.

i have used cdosys on 2000 servers.
well...as I said....CDONTS is default with Windows 2000  (mine was bought prior to December 2003)...so unless the questioner has a newer version of it on there server, then they more than likely have CDONTS

unless of course I'm lying, and it's not windows 2000 server that I have installed (which being around the scene for over a decade, I'm pretty sure it is Windows 2000 Server that is installed, as I installed it myself)

Besides the fact that the code the quesitoner has provided is used for CDONTS...........
i will not participate in another one of your flame wars, kevp75.  i was simply adding to your comment to give more information.
flame wars?  hmm.  

well, thank you for clarifying that, but I'm also not the only one who see's that cdonts is on w2k.  All i'm trying to do is give the correct information, and not confuse the asker.  I do see on MS that as of Dec. 2003 cdosys was the default, is there a download associated with it, as I know it wasn't part of any service pack (I have up to SP4 installed)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.