PDA

View Full Version : CFMAIL with Flash MX


JeffHobbs
11-10-2003, 11:47 PM
All,

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--->
<CFMAIL
<!--- This is a email group maintained by DPW/MIS --->
TO="[email protected]"
FROM=
<cfif #arguments.rdoResponse# EQ "YES">
"#arguments.txtResponse#;"
<cfelse> "Confidential Intranet Email<[email protected]>;"
</cfif>

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"> --->
</CFMAIL>
<cfreturn "Your email has been sent! Thanks for the input">
</cffunction>
</cfcomponent>

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:
FROM=
"#arguments.txtResponse#;"

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.

TIA,

Jeff