<cfloop ...>
<cfset recipName = listFirst(recipient, "@") />
<cfset recipName = uCase(left(recipName, 1)) & mid(recipName, 2, 
len(recipName)) />
<cfmail ...>
 Dear #recipName#,
....


>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:317407
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