PDA

View Full Version : CDONTS Attachments


details
08-26-2002, 07:16 PM
I am using CDONTS to e-mail attachments using
objMail.AttachFile("e:\web\attachments\direcway.htm")

My customer has several agreements that must be e-mailed depending on product purchased. Is there a way to dynamically create this attachment. ex......


if strAgreement = "dir" then
objMail.AttachFile("e:\web\attachments\dir.htm")
else if strAgreement = "dirt" then
objMail.AttachFile("e:\web\attachments\dir2.htm")
end if
end if

Any ideas, or am I make something simple - difficult?

whammy
08-28-2002, 02:43 AM
Have you tried that? Usually If/Then statements work fine for just about anything!

Morgoth
08-29-2002, 08:47 AM
if strAgreement = "dir" then
objMail.AttachFile("e:\web\attachments\dir.htm")
else if strAgreement = "dirt" then
objMail.AttachFile("e:\web\attachments\dir2.htm")
end if
end if


I am not to sure if this is the problem, but I knew it was for a me a few times. Misspelling of words and such.


if strAgreement = "dir" then
objMail.AttachFile("e:\web\attachments\dir.htm")
else if strAgreement = "dirt" then
objMail.AttachFile("e:\web\attachments\dir2.htm")
end if
end if


As I said before, this might not be the problem, but dirt and dir2 don't match (by title). Maybe it could be the problem, maybe it might not be the problem.

Sorry if this doesn't help, but I have had a few problems like this before.

whammy
08-31-2002, 12:45 AM
Good catch, Morgoth. ;)