PDA

View Full Version : E-Mail Attachment w/ CDONT


JoeP
10-20-2002, 09:54 PM
I do not have any problems with sending an ASP e-mail page utilizing CDONTS. The syntax I use is:


hopStrTo = Request.Form("hopStrTo")
hopStrFrom = Request.Form("hopStrFrom")
hopStrCc = Request.Form("hopStrCc")
hopStrSubject = Request.Form("hopStrSubject")
hopStrAttch = Request.Form("hopStrAttch")
hopStrBody = Request.Form("hopStrBody")


The problem I have is the attachment. If I HARD code the syntax:

hopMailBox.AttachFile "C:\Test.txt", "Test.txt"

The Test.txt goes with the e-mail - No Problems.


If I try to use the variable hopStrAttch passed from the form, it is not recognized and the file as well as the email) does not go.

I have tried:

hopStrAttch = "C:\Test.txt", "Test.txt" in the Form Box
with ASP code:

hopMailBox.AttachFile hopStrAttch

also tried 2 variables:

hopStrAttch1 = "C:\Test.txt"
hopStrAttch2 = "Test.txt"
with ASP code:

hopMailBox.AttachFile hopStrAttch1, hopstrAttach2

No Luck.


Any suggestions and or guidance very much appreciated.

TIA

whammy
10-21-2002, 07:30 AM
My suggestion would be to write the variable that's giving you trouble to the page.

That's always the first step in debugging... first of all you want to make sure it has a value... if not, there's the problem.

If so, then the value is probably wrong, and by writing it to the page, you can see what's wrong. :)

JoeP
10-21-2002, 02:29 PM
Thx for the tip. I actually had done that as a debug step. I even made sure I had the ' " ' in the strings...:(

Any additional info will be appreciated.