Adobe ColdFusion 8

Sending form-based e-mail

In the following example, the contents of a customer inquiry form submittal are forwarded to the marketing department. You could also use the same application page to insert the customer inquiry into the database. You include the following code on your form so that it executes when users enter their information and submit the form:

<cfmail
    from="#Form.EMailAddress#"
    to="marketing@MyCompany.com,sales@MyCompany.com"
    subject="Customer Inquiry">

A customer inquiry was posted to our website:

Name: #Form.FirstName# #Form.LastName#
Subject: #Form.Subject#

#Form.InquiryText#
</cfmail>