that will not work ... you should have your CFIF before the cfmail tag <cfif form.intype EQ "K-12"><CFSET V_cc="te...@test2.com"> <CFELSE> <CFSET V_cc=""> </Cfif>
<CFMAIL from="#FORM.email#" To="t...@test.com" cc="#V_cc#"Subject="New Jersey"> ________________________________ From: "Orlini, Robert" <rorl...@hwwilson.com> To: cf-talk <cf-talk@houseoffusion.com> Sent: Mon, February 22, 2010 4:57:08 PM Subject: CFIF within CFmail? Hello, I'm trying to include a cfif within a cfmail. If a form element is "K-12", then I want to add a cc to the cfmail part. Here is what I have in part: <CFMAIL from="#FORM.email#" To="t...@test.com" <cfif #form.intype#="K-12">cc="te...@test2.com"</Cfif> Subject="New Jersey"> It generates an error. Is there a better way to do this? Thanks. RO HWW ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331016 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4