Copy link to clipboard
Copied
I have created an application using coldfusion that takes a bunch of inputs to produce an HTML page which gets emailed to the user. In this app the user can upload files to be attached to the html page. The problem I am having is the users don't have access to the location of the uploaded files so they can't access the files in the emailed page. How can I attach the actual uploaded file to the HTML page so that anyone that gets that page has access to the documents with in it? The users can't have access to the file location, based on that is there a better way of doing this?
Usine CF7 and IE7
Any input would be helpful to me.
Thank you
Chris
Copy link to clipboard
Copied
If you're emailing documents to the user, have you tried simply attaching the files to the outgoing email? You can use the cfmailparam tag to add an attachment to an email:
http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_m-o_02.html#1101294
If you don't want to actually attach the documents, you'll need to use an intermediary ColdFusion page which uses cfcontent to stream the binary documents to the browser from their secure location.
Regards,
Daniel Short
Adobe Community Expert
Copy link to clipboard
Copied
Daniel,
Thanks for taking the time to respond. I want the documents to be part of the emailed doc that the user would get. Are you saying that I can capture the text of the file to be attached via the cfcontent and stream that into my doc to be emailed?
Thanks
Chris
Copy link to clipboard
Copied
cr6137 wrote:
Daniel,
Thanks for taking the time to respond. I want the documents to be part of the emailed doc that the user would get. Are you saying that I can capture the text of the file to be attached via the cfcontent and stream that into my doc to be emailed?
Thanks
Chris
I'm saying you can use the cfmailparam tag to actually attach the physical file to the email, just as you would if you were sending the email via Outlook or Apple Mail, or any other mail client. Check the link I sent for the CF livedocs and examples of how to attach a file to an email.
Dan
Copy link to clipboard
Copied
In my case the user is uploading the files from their PC which needs to be attached to the doc emailed back. This is needed so that it can be passed off to another group to use the doc. It would be helpful if the docs could be attached/embeded to streamline the process. The users won't have access to the embeded docs otherwise.
Thanks
Chris
Copy link to clipboard
Copied
I don't know of any way to merge Word documents on the server side. I think your path of least resistance is going to be just attaching them to the email, perhaps even putting a short summary of the attachments in the email like: