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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending a file from the server as an email attachment: Coldfusion

Status
Not open for further replies.
Jul 1, 2004
28
US
Hello all,
I am trying to send a pdf that resides on the server as an attachment. Potential customers provde their information through a coldfusion form and I am trying to send them the PDF once completed. Any idea on how to accomplish this? I am aware of the cfmailparam tag...but it seems like that is only for files on the client side. Any help would be awesome...I have beaten my head against the desk for quite a while on this one.

Thanks,
Matt
 
the cfmailparam tag only uses files on the server, before attaching a file on the client to an email, it first has to be uploaded, you should be able to simply pass the server path to file in the cfmailparam tag.

see for a good description of how the process works

maybe you can post the code you've tried so far?


=========================================
I have not failed. I've just found 10,000 ways that won't work.
Thomas A. Edison
 
I am not looking to have the user upload a file...I am looking to have the user submit information about themselves and once recieved, send them a file that already resides on the server as an e-mail attachment. Does this make sense?
 
same way. just put the path of the file in the cfparam tag. it doesn't have to be JUST uploaded by a user.

A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
-Douglas Adams (1952-2001)
 
is this a relative path or a absolute path?? can you give an example?
 
you'd use the physical path. you can make it relative but it isn't the path of your site ( its the path to the file using the directory structure (c:\
you can use expandPath to make it relative.
here are links to help you.

expand path:
cfmailparam:
A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
-Douglas Adams (1952-2001)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top