Contents > Developing ColdFusion MX Applications > Sending and Receiving E-Mail > Sample uses of cfmail > Sending form-based e-mail PreviousNext

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 web site:

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

#Form.InquiryText#
</cfmail>

Contents > Developing ColdFusion MX Applications > Sending and Receiving E-Mail > Sample uses of cfmail > Sending form-based e-mail PreviousNext

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.