My task: I need to send an email message to 914 people. These people's information is in a data table, NBPTS_Principals_Unapprove
My strategy is, I will query the table NBPTS_Principals_Unapprove
d, loop through the 914 table rows (one row per person), and use CFMAIL to deliver an HTML formatted email message.
Each person will receive the email only one time. And, only ten email messages will go out in a single SMTP request.
Is it possible to do this using the MAXROWS attribute of the CFMAIL tag?
I did some reading on CFMAIL:
If I understand this documentation correctly, then MAXROWS will do what I want.
1. Does anyone have any advice about sending bulk email messages using CFMAIL? I do not want my SMTP server to get flagged as a spam source.
2. Am I using CFLOOP and CFMAIL correctly, below?
Thank you as always for any advice. =)
Author: Eric B
Description: This template does these actions:
1) query table NBPTS_Principals_Unapproved to get Names and Email addresses of 914 Principals who were not approved for the NBPTS Field Test
2) create an HTML formatted email message to send to each principal
Created: September 2010
ColdFusion Version 8
MS SQL Server 2005
<!--- Set the datasource --->
<!--- select columns from table tbl_NBPTS_Principals, for use later in this application --->
<cfquery datasource="#ds#" name="GetPrincipalstoApprove">
<!--- generate email --->
<!--- email message goes inside CFLOOP --->
FROM="NBPTS Principals Field Test"
SUBJECT="NBPTS Principals Field Test"
username = "xxxxxxxx"
password = "xxxxxxxx"
<!--- begin cfoutput --->
<!--- begin formatted email message --->
<title>NBPTS Principal Field Test</title>
<img src="http://www.nbptsprincipals.org/img/nbpts_email_letterhead.gif" width="710" height="158" alt="NBPTS Letterhead" />
<p>September 17, 2010</p>
<p>#GetPrincipalstoApprove.Salutation# #GetPrincipalstoApprove.FirstName# #GetPrincipalstoApprove.LastName#<br />
#GetPrincipalstoApprove.City#, #GetPrincipalstoApprove.State# #GetPrincipalstoApprove.ZIP#</p>
<p>Dear #GetPrincipalstoApprove.Salutation# #GetPrincipalstoApprove.LastName#,</p>
<p>Thank you for expressing your interest in participating in the National Board for Professional Teaching Standards Principal Certification field test. We had an overwhelming response from principals across the country, hearing from nearly 2,000 principals who indicated a desire to take on this professional challenge.</p>
<p>We only selected 600 principals based on field test criteria. According to these criteria, you were not selected to participate in the field test. Selection to participate in the field test is not a designation of merit, but rather designed to assure validity and reliability of the assessment for principal in all school types.</p>
<!--- close cfoutput --->
<!--- close cfmail --->
<!--- close cfloop --->