Forum Moderators: open

Message Too Old, No Replies

CDONTS Email Error - Object doesn't support this property or method

Object doesn't support this property or method: 'To'

         

vincentwansink

3:56 am on Mar 23, 2004 (gmt 0)

10+ Year Member



I'm trying to use CDONTS to send email but I keep getting the same error.

The error I get is:
Object doesn't support this property or method: 'To'
Line 55

I'm sure 'To' is a valid property, so why the error?

Here's my code
****************************************************
Dim NewMail
Set NewMail = Server.CreateObject("CDONTS.NewMail")

NewMail.From = "vw@computronix.com"
NewMail.To "vincentwansink@shaw.ca"
NewMail.Subject = "RHA Quarterly Reports Database"
NewMail.Body = "This is a system generated email. Do Not Reply."
NewMail.AttachFile Server.Mappath("db/rhaqtr.mdb")

NewMail.Send
****************************************************

Anybody have a clue? I would appreciate any comments to maybe steer me in the right direction.

Vince.

defanjos

4:08 am on Mar 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld

Try:
NewMail.To="vincentwansink@shaw.ca"
(notice the "=")

Instead of:
NewMail.To "vincentwansink@shaw.ca"

vincentwansink

4:28 am on Mar 23, 2004 (gmt 0)

10+ Year Member



Wow! I can't believe I'm so blind. Lol. Thanks for giving my head a shake... it works!