you basically have to have to cfmail statement blocks one with cc if cc isdefined and one without it, if its not defined, and valid as an email address. there is much checking that you could be doing for correct structure of an email address with regEx, and other things but, you just cant put cf logic within a tag like that.
tony -----Original Message----- From: Parker, Kevin [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 11:52 PM To: CF-Talk Subject: Optional cc Can anyone give me a pointer here please. I am trying to populate cc in CFMAIL if the user checks a checkbox on the form. I've tried several variations of this but CF doesn't quite agree with it. TIA! <!--- Ensure that the check box has a value ---> <cfparam name="SendReceipt" default="0"> <!--- Prepare an email to RISE ---> <cfmail to="[EMAIL PROTECTED]" from="#EmailAddress#" subject="Vacancy inquiry - #PositionTitle#" <CFIF SendReceipt EQ 1>cc="#EmailAddress#"</CFIF> bcc="[EMAIL PROTECTED]" server="ex1" port=25 timeout=120>An inquiry has been received from the web site about a RISE Vacancy.</cfmail> ********** Kevin Parker Web Services Manager WorkCover Corporation [EMAIL PROTECTED] www.workcover.com p: 08 82332548 f: 08 82332000 m: 0418 806 166 ********** ************************************************************************ This e-mail is intended for the use of the addressee only. It may contain information that is protected by legislated confidentiality and/or is legally privileged. If you are not the intended recipient you are prohibited from disseminating, distributing or copying this e-mail. Any opinion expressed in this e-mail may not necessarily be that of the WorkCover Corporation of South Australia. Although precautions have been taken, the sender cannot warrant that this e-mail or any files transmitted with it are free of viruses or any other defect. If you have received this e-mail in error, please notify the sender immediately by return e-mail and destroy the original e-mail and any copies. ************************************************************************ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

