Question
CDOSYS with Attachment error
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.
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.
