You can nest a CFML tag inside an HTML tag, but not in another CFML tag.
One way:
<cfmail to="[EMAIL PROTECTED]"
from="The Website"
cc="#Iif(IsDefined('IncludeRequestor'),DE(RequestorEmail),DE(''))#"
subject="Data Change Request"
replyto="[EMAIL PROTECTED]"
type="HTML">
Blah blah blah
</cfmail>
Another way (to me more readable):
<cfif IsDefined("IncludeRequestor")>
<cfset cc=RequestorEmail>
<cfelse>
<cfset cc="">
</cfif>
<cfmail to="[EMAIL PROTECTED]"
from="The Website"
cc="#variables.cc#"
subject="Data Change Request"
replyto="[EMAIL PROTECTED]"
type="HTML">
Blah blah blah
</cfmail>
--- "Claremont, Timothy" <[EMAIL PROTECTED]> wrote:
> Currently my email is done like this:
>
> <cfmail to="[EMAIL PROTECTED]"
> from="The Website"
> subject="Data Change Request"
> replyto="[EMAIL PROTECTED]"
> type="HTML">
> Blah blah blah
> </cfmail>
>
>
> What is the elegant way to CC a recipient if the requesting form has a
> checkbox that says "IncludeRequetor"? The following does not seem to be
> working:
>
>
>
> <cfmail to="[EMAIL PROTECTED]"
> from="The Website"
> <cfif IsDefined
> ("IncludeRequestor")>cc="RequestorEmail"><cfif>
> subject="Data Change Request"
> replyto="[EMAIL PROTECTED]"
> type="HTML">
> Blah blah blah
> </cfmail>
>
> TIA,
> Tim
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please delete
> it from your system.
>
> This footnote also confirms that this email message has been swept for
> the presence of computer viruses.
>
> Thank You,
> Viahealth
> **********************************************************************
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189522
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54