Sending Data-Driven Mail

In the last section, you saw that <cfmail> can be thought of as an extended version of the <cfoutput> tag because ColdFusion variables and expressions are evaluated without the need for an explicit <cfoutput> within the <cfmail>. The similarity between the two tags doesn’t end there. They also share attributes specific to the notion of looping over query records. This capability enables you to send data-driven email messages using nearly the same syntax and techniques that you use to output data-driven HTML code.

Table 21.2 shows the <cfmail> attributes relevant to sending data-driven mail. Each of these attributes behaves the same way as the corresponding attributes for <cfoutput>. Instead of causing HTML output to ...

Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.