Email a csv file from a form

Posted on 2006-11-06
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.
Question by:aspiegel
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 15

Expert Comment

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

Author Comment

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

Expert Comment

ID: 17884277
I would start with <CFFILE>

LVL 13

Accepted Solution

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.

Author Comment

ID: 17899080
That worked great. Thanks for your help.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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
Nameserver and MX Record 2 82
Moving web servers into a DMZ? 3 84
DNS @ Naked Domain Record 5 130
move expression web site to a new server 13 105
Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: :…
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. …

734 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