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

CFMail Send Excel document in Email

Status
Not open for further replies.

GryphonsClaw

Programmer
Oct 3, 2005
9
0
0
US
I want to send a report with an excel document in it. I do not want to attach the file from the server, which involves using the CFFILE tag to write it and doing some kind of clean up afterwards after the mail has left the queue.

What I have so far works with GMAIL but not thunderbird. I'm just looping through the form to test it out.

ColdFusion 7 server. Any help appreciated, not an expert on the mime attachments and such.

Attach Code

<cfmail to="me@gmail.com"
subject="Quote"
from="webmaster@me.com">

<cfmailparam name="Content-Disposition" value="attachment;filename=Submission.xls">

<cfloop collection="#FORM#" item="Name">
<cfif Name NEQ "FIELDNAMES">
<b>#Name#</b><br>
#FORM[Name]#<br><br>
</cfif>
</cfloop>
</cfmail>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top