VBScript Error with CDONTS

J

Joseph Narissi

Hello,

Using IIS4 on a NT4 system.... sometimesI get the following error:

Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument

Here is the code:

function UtilSendEmail(to_addr, cc_addr, from_addr, subject, body)

UtilSendEmail=0
Dim objCDO
Set objCDO = CreateObject("CDONTS.NewMail")

objCDO.To = to_addr
objCDO.Cc = cc_addr
objCDO.From = from_addr
objCDO.Subject = subject
objCDO.Body = body
objCDO.Send

set objCDO=Nothing

end function


The error always occurs on the FROM line..... any ideas?

Thanks ahead for any help....

Joesph Narissi
(e-mail address removed)
 
A

Aaron Bertrand - MVP

I don't see the problem, but try using CDO.Message instead... CDONTS is
deprecated.
 
J

Joseph Narissi

Isnt CDO only available for Win2K+? We are using NT4... does thi smatter?
 
A

Aaron Bertrand - MVP

Isnt CDO only available for Win2K+?

Yes. CDONTS is still deprecated, so your code will stop working when you
finally decide to ditch NT. How about using one of the other dozens of mail
objects available? http://www.aspfaq.com/2119
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top