I am trying to create a template to mail a newsletter to a list of members
by looping thru the members table. The main purpose of using cfloop is to
prevent each member from receiving the entire list of E-mail addresses in
the header as well as make the message a little more personal.

Is there anyway to have each copy display an individual greeting to each
recipient? Naming the query in the CFOUTPUT tag, causes the whole list of
names to display on every message but if eliminating the query name, only
returns the first name on the list, no matter to whom the message is
addressed.

Any advice you can share will be greatly appreciated.

Here is the code for the mail form:

<CFQUERY name="Recipients" dataSource="DSN">
        SELECT Members.Contact, Members.Email AS EmailField
        FROM Members
        WHERE Members.Email <> ""
        ORDER BY Members.Contact
</CFQUERY>

<CFINCLUDE template="admin_header.cfm">

<div align="center">
<FONT size="+2"><B> Members Mailing Form</font></B>
</div>

<!---  Entry form  --->

<FORM action="Members_MailingAction.cfm" method="post">

<TABLE width="500" align="center" border=0 cellspacing=0 cellpadding=10>

        <TR><TD valign="top" align="right"><B>To:</B></TD>
                <TD>
                <INPUT type="hidden" name="SelectedRecipients_required"
value="You did not select any recipients">

                <SELECT name="SelectedRecipients" size=5 multiple>
                <CFOUTPUT query="Recipients">
                <OPTION value="#EmailField#">#Contact#</CFOUTPUT>

                <OPTION
value="">------------------------------------------------
                </SELECT>
<CFOUTPUT>
<INPUT type="hidden" name="Salute" value="#Recipients.Contact#">
</CFOUTPUT>
                </TD>
        </TR>

        <TR><TD align="right"><B>From:</B></TD>
                <TD><INPUT type="text" name="Sender" size=40></TD>
        </TR>

        <TR><TD align="right"><B>Subject:</B></TD>
                <TD><INPUT type="text" name="Subject" size=40></TD>
        </TR>

        <TR><TD colspan=2>
                <TEXTAREA name="Message" rows=20 cols=60></TEXTAREA>
                </TD>
        </TR>

        <TR><TD colspan=2 align="center"><INPUT type="submit" value="
Send      "></TD></TR>
</TABLE>

</FORM>
<CFINCLUDE template="admin_footer.cfm">


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:296379
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to