memberlogin
contactus
randomfacts

send email with coldfusion

I\'ve used this particular example below to send an email using all of the form fields submitted by the contact form.

 

<cfoutput>
 <h1>Thank you for updating your ad schedule</h1>
 Your message has been sent.
  <cfsavecontent variable="messageContent">
   <cfloop list="#fieldnames#" index="i">
   <cfset tempvalue = evaluate("#i#")>
   <cfif FindNoCase("slot",i)>
    #tempvalue#
   <cfelse>
    <strong>#i#:</strong>#tempvalue#
   </cfif>
   <br>
   </cfloop>
 </cfsavecontent>
<cfmail
  to = toemailaddress@here.com
  bcc = toemailaddress2@here.com
        from = fromemailaddress@here.com
        subject = "whatever_your_subject_is" 
        type="html"
  server = "whatever_your_website_hosts_mailservers_smpt_name_is">
CONTENTCONTENT CONTENTCONTENT CONTENTCONTENT CONTENTCONTENT CONTENTCONTENT CONTENTCONTENT CONTENTCONTENT CONTENTCONTENT
</cfmail>
</cfoutput>