View Full Version : CFMAIL with Flash MX

11-10-2003, 11:47 PM

I have the following ColdFusion component:

<cfcomponent name = "confidentialMail">
<cffunction access="remote" name="sendMail" returntype="string" displayname="Confidential Email" hint="Confidential email">
<!---"message" will be a function in the flash movie --->
<cfargument name="subject" type="string" required="true" displayname="Subject" hint="eMail Subject">
<cfargument name="message" type="string" required="true" displayname="Message" hint="Message">
<cfargument name="txtResponse" type="string" required="no" displayname="Response" hint="Response eMail Address">
<cfargument name="rdoResponse" type="string" required="no" displayname="rdoResponse" hint="Radio Button - Response Requested">
<!---Send mail, based on flash input--->
<!--- This is a email group maintained by DPW/MIS --->
TO="[email protected]"
<cfif #arguments.rdoResponse# EQ "YES">
<cfelse> "Confidential Intranet Email<[email protected]>;"

SUBJECT= "#subject#"
#message# #rdoResponse# #txtResponse#
<!--- set the priority of the email --->
<cfmailparam name="X-Priority" value="1">
<!--- change the reply address
<cfmailparam="Reply-To" value="address"> --->
<cfreturn "Your email has been sent! Thanks for the input">

It is integrating with Flash MX. All appears to be fine EXCEPT for the "FROM". When working with the "FROM", if I don't use the conditional - and instead just use:

It works. However when I put in the conditional, the component won't validate.

On the Flash side, I have a move with a pair of radio. If one radio is selected, the FROM is a static email address. However if the other radio is selected, the user puts in their own email address.

Hopefully this makes sense.