ColdFusion 9.0.2
MS SQL Server 2005

Greetings. I have a question about lists and CFMAIL.

I need to send an email message to all email addresses in a data table that
are not marked "PaidDues".

First, I query the data table to find all records with PaidDues = False (or
0).

<!--- ask for userIDs who have not paid yearly membership fee --->
<cfquery datasource="#application.datasource#" name="NotPaid">
SELECT UserID
,FirstName
,LastName
,UserEmail
,PaidDues
FROM #request.membersTable#
WHERE PaidDues = <cfqueryparam cfsqltype="cf_sql_integer" value="0">
</cfquery>

Then I set up CFMAIL to send a reminder message to all UserEmail addresses
where PaidDues = 0.

<!--- is form.doRemind defined? --->
<cfif IsDefined("FORM.doRemind")>

<cfmail  
      server="#REQUEST.MailingListServer#"  
      from="Email Address" 
      to="#NotPaid.UserEmail#" 
      subject="NNVAWI Membership Dues Reminder"
          username = "authorized user name"
      password = "#REQUEST.MailingListAdminPass#"
      SpoolEnable="Yes"
      type="html">
      
      <h1>Greetings, #NotPaid.FirstName# #NotPaid.LastName#.</h1>
      
      <p>This is a friendly reminder to pay your NNVAWI membership dues for
the current year. You may do so here at the secure authorize.net payment
page:
      
      <a
href="https://simplecheckout.authorize.net/payment/CatalogPayment.aspx";>http
s://simplecheckout.authorize.net/payment/CatalogPayment.aspx</a></p>
     
      </cfmail>
</cfif>
<!--- /is form.doRemind defined? --->

The problem is that I need CFMAIL to process all of the records where
PaidDues = 0 -- I think, as a list. So that each email recipient is
identified correctly by FirstName, LastName; and the dues reminder message
goes out to all of the email addresses identified in the query.

I think the list function is what I need -- but I am not sure how to
implement it.

http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSf01dbd23413dda0e1fb0
8f8f11feb424aa7-8000.html

Am I going down the right path? Thank you for any advice.

Eric





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353324
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to