5.19.2006

CFMAIL example

From a table named "maillist" that looks as follows:


Keylast_namefirst_nameemail_address
1PeetJimjrpeet@somedomain.com
2SmithFredfred.smith@somedomain.com
3EdwardsKarenkedwards@somedomain.com
..................@somedomain.com
n..............@somedomain.com


---------- The Cold Fusion is as follows ------------- (note HTML tags excluded)

<!-- Query -->
<cfquery name="get_maillist" datasource="some_data_source">
select * from maillist
</cfquery>

<!--- Emails are sent right now! -->

<h1>cfmail test</h1>

<cfoutput query="get_maillist">

<CFMAIL
TO="#email_address#"
from="jrpeet@anydomain.com"
subject="Your Reservation has been Recorded"
type="HTML">

<html>
<head>
<style>
H1 {font: bold 18pt "Verdana","Comic Sans","Arial"; color: navy}
p { font: 10pt "Verdana","Comic Sans","Arial"; color: navy}
</style>
</head>
<body bgcolor="aliceblue">
<div align="center">
<h1>Reservation Accepted</h1>

</div>
</body>
</html>
</CFMAIL>
</cfoutput>

No comments:

Post a Comment

Any anonymous comments with links will be rejected. Please do not comment off-topic