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!

CDONTS ....attachfile error

Status
Not open for further replies.

jcroft

Programmer
Aug 23, 2001
52
US
Can you tell me what I am doing wrong...?

Error I get:

Microsoft VBScript runtime error '800a01b6'

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

/managementemail/email.asp, line 71

My code is:

Set MyCDONTSMail = CreateObject("CDONTS.NewMail")
MyCDONTSMail.MailFormat = cdoMailFormatMIME
MyCDONTSMail.From = "who@who.com"
MyCDONTSMail.To = "whotoo@who.com"
MyCDONTSMail.Subject= Request.Form("Subject")
MyCDONTSMail.BodyFormat = cdoBodyFormatHTML
MyBody = &quot;To: &quot; & fname & &quot; &quot; & lname & &quot;<br><BR>&quot;
MyBody = MyBody & &quot;From: &quot; & &quot;Mr. Magoo&quot; & &quot;<br><BR>&quot;
MyBody = MyBody & tonamebody1 & &quot;<br><BR>&quot;

MyCDONTSMail.Body= MyBody
MyCDONTSMail.Attachfile=&quot;'C:\My Documents\history.zip','history.zip',1&quot;
MyCDONTSMail.Send
set MyCDONTSMail=nothing

--only those that do not try, fail--
 
MyCDONTSMail.Attachfile=&quot;'C:\My Documents\history.zip','history.zip',1&quot;

Is this file on the web server that you are running this script on? If not, it needs to be. The C: drive to the ASP script is on the web server.

If that is the server, then have you tried:

MyCDONTSMail.Attachfile= (&quot;C:\My Documents\history.zip&quot;)

?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top