Solved

Email a csv file from a form

Posted on 2006-11-06
5
140 Views
Last Modified: 2013-12-24
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.
0
Comment
Question by:aspiegel
  • 2
  • 2
5 Comments
 
LVL 15

Expert Comment

by:danrosenthal
ID: 17883014
How about writing the results to a file and attaching the file to the email using CFMAILPARAM?
0
 

Author Comment

by:aspiegel
ID: 17884246
What is the best way to write an excel file(csv) and also still email the form to the user?
0
 
LVL 15

Expert Comment

by:danrosenthal
ID: 17884277
I would start with <CFFILE>

0
 
LVL 13

Accepted Solution

by:
usachrisk1983 earned 250 total points
ID: 17895109
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
 

Author Comment

by:aspiegel
ID: 17899080
That worked great. Thanks for your help.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Blue Coat API portal URL 2 177
Configure IIS to process JSON 10 90
WCAG (Web Content Accessibility Guidelines) levels 3 103
Best practices for sharing large amounts of data 9 99
Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question