Skip to main content
Inspiring
June 5, 2006
Question

CDOSYS with Attachment error

  • June 5, 2006
  • 1 reply
  • 223 views
Hi,

I have set up an email script using CDOSys which works fine. I now want to
add the option of sending an attachment with the email but I cannot get it
to work. I am including the line in my code as follows:

MyMail.AddAttachment Request.Form("MyFile")

This is grabbing the file path enetered in a filefield on the previous page
and then posted to the email page.

After reading numerous articles on this subject this method seems to be the
way to do it but it doesn't send the attachment. I am only testing locally.
I don't get an error when the script is run and when I view the email in
mailroot it does include a blank attachment but the attachment it sends is a
.DAT file. Mine should be a .txt file.

Can anyone point out where this going wrong please.


This topic has been closed for replies.

1 reply

Inspiring
June 6, 2006
The file the user is attaching must be on your server. If the user is
sending a file from your server, be sure the path is correct. If the file
is on the user's computer, it must first be uploaded to the server, then
attached to the e-mail.

"Herman" <herman@nomailme.com> wrote in message
news:e60pst$l43$1@forums.macromedia.com...
> Hi,
> MyMail.AddAttachment Request.Form("MyFile")
>
> This is grabbing the file path enetered in a filefield on the previous
> page and then posted to the email page.