Try this:

<cfset arguments=StructNew()>
<cfset arguments.from=FORM.email>
<cfif form.intype="K-12">
   <cfset arguments.cc="te...@test2.com">
</cfif>

<cfmail attributeCollection=arguments>
...
</cfmail>


-----Original Message-----
From: Orlini, Robert [mailto:rorl...@hwwilson.com] 
Sent: Monday, February 22, 2010 9:57 AM
To: cf-talk
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="# #" 
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:331014
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to