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

Error Message in CDONTS

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
The error is:

filObject.Send("me@me.com", "you@you.com", "Subject", "Body",cdoHigh)

I am getting an error that says, "Cannot use parentheses when calling a Sub." Any ideas why this would come up? I have examined code for any syntax errors and found none. I am also noticing that I must "declare the CDO type library." How do I do this and are these two incidents connected? Thanks for the help!

Jason
 
Don't use parantheses! Ie:

filObject.Send "me@me.com", "you@you.com", "Subject", "Body",cdoHigh

Most people normally set the to, from, body properties etc manually then run the send method, but your way might work. If not try:

Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.From = me@me.com
objCDO.To = you@you.com
objCDO.Subject = "My Subject"
objCDO.Body = "My body text"
objCDO.Send
set objCDO = nothing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top