Email a csv file from a form

I have a form created in ColdFusion. I am emailing the results of the form. All is working great. I need to add a function that will also allow me to email the form fields to a specied user in a csv format. Any help will be greatly appreciated.
aspiegelAsked:
Who is Participating?
 
usachrisk1983Connect With a Mentor Commented:
Use CFFILE with an ACTION of WRITE to put the data you need into a file.  Keep the file outside of the public website, if possible -- you can probably use the temporary directory for this.  Then, just use CFMAIAL with the CFMAILPARAM tag nested inside to mail the file to the user.  I would recommend not deleting the file immediately, since depending on your CF mail spool settings, you may end up deleting the file before the mail server is able to grab it to send out.
0
 
danrosenthalCommented:
How about writing the results to a file and attaching the file to the email using CFMAILPARAM?
0
 
aspiegelAuthor Commented:
What is the best way to write an excel file(csv) and also still email the form to the user?
0
 
danrosenthalCommented:
I would start with <CFFILE>

0
 
aspiegelAuthor Commented:
That worked great. Thanks for your help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.