Sending E-Mail To Multiple Recipients - MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual

Table of Contents

Advertisement

Sample Uses of cfmail
#ProductRequests.FirstName# #ProductRequests.LastName#
</cfoutput>
Regards,
The WebMaster
webmaster@MyCompany.com
</cfmail>
Note the use of the
normal
ProductRequests query, while the text above and below it serve as the header and
footer, respectively, for the mail message. The
carriage return between output records.

Sending e-mail to multiple recipients

In the following example, a query (BetaTesters) retrieves a list of people who are beta
testing ColdFusion. This query is then used to send a notification to each of these
testers that a new version of the beta release is available:
<cfmail query="BetaTesters"
To all Widget beta testers:
Widget Beta Four is now available
for downloading from the MyCompany site.
The URL for the download is:
http://beta.mycompany.com
Regards,
Widget Technical Support
beta@MyCompany.com
</cfmail>
Note that in this example, the contents of the
is, the tag does not use any # delimited dynamic parameters. What is dynamic is the
list of e-mail addresses to which the message is sent. Note the use of the TesterEMail
column from the BetaTesters query in the
(#ProductRequests.Company#) -
#ProductRequests.EMailAddress#&##013;
cfoutput
message. The text within the
cfmail
from="beta@MyCompany.com"
to="#TesterEMail#"
subject="Widget Beta Four Available">
tag to present a dynamic list embedded within a
cfoutput
&##013;
cfmail
attribute.
to
is repeated for each row in the
in the
block forces a
cfoutput
tag body are not dynamic, that
305

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents