I would just do something like this then.
<CFQUERY NAME="GetRecipients" DATASOURCE="#DataSource#">
SELECT * FROM Recipients
</CFQUERY>
<cfloop query="GetRecipients">
<cfmail to="#GetRecipients.Email#" from="#sender_email#"
subject="My Message To You 2009" >
#sender_date#
Dear #GetRecipients.Name#
This is my message to the recipient. This is my message to the
recipient. This is my message to the recipient. This is my message to
the recipient. This is my message to the recipient. This is my message
to the recipient. This is my message to the recipient. This is my
message to the recipient.
Yours truly,
#sender_firstname# #sender_lastname#
#sender_address#
#sender_city#, #sender_state# #sender_zip#
#sender_email#
</cfmail>
</cfloop>
-----Original Message-----
From: cfcom [mailto:[email protected]]
Sent: Monday, January 05, 2009 2:21 PM
To: cf-talk
Subject: RE: Personalizing a CFLoop
Yes, it is stored. I can store form_sender and recipients if necessary
-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: 2009-01-05 2:13 PM
To: cf-talk
Subject: RE: Personalizing a CFLoop
Is the recipient data stored in a table by chance?
-----Original Message-----
From: cfcom [mailto:[email protected]]
Sent: Monday, January 05, 2009 2:01 PM
To: cf-talk
Subject: Personalizing a CFLoop
CFLoop Problem:
I need to take the contents a visitor enters into our form and
use
it to send out personalized emails to several recipients. How do I set
up
the cfloop so that it sends a unique email to each recipient,
personalizes
the opening sentence and ends it signed by the visitor using the form.
So
far I can loop to each different address but I am having trouble doing
the
'name/email' pair of variables.
<cfinsert datasource="mynamedsn" tablename="mytablename"
formfields="sender_firstname, sender_lastname,
sender_email, sender_address, sender_city, sender_state, sender_zip,
sender_time, sender_date, sender_ip, sender_msgType">
<cfset recipients="[email protected], [email protected], [email protected],
[email protected]">
<cfloop list="#recipients#" index="recipient" delimiters=",">
<cfmail to="#recipient#" from="#sender_email#" subject="My
Message
To You 2009" >
#sender_date#
Dear #_________#,(needs to be name as designated by recipient
email:
'Bob' for '[email protected]')
This is my message to the recipient. This is my message to the
recipient. This is my message to the recipient. This is my message to
the
recipient. This is my message to the recipient. This is my message to
the
recipient. This is my message to the recipient. This is my message to
the
recipient.
Yours truly,
#sender_firstname# #sender_lastname#
#sender_address#
#sender_city#, #sender_state# #sender_zip#
#sender_email#
</cfmail>
</cfloop>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317415
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4