I'm trying to do this sort of thing:

<cfscript>
// Set some variables
bunchOfOtherVariables = "Values";
// Plain or HTML format?
formatType = "html"; // (html|plain)
</cfscript>
<cfmail from="#myFrom#"
        to="#myTo#"
        subject="#mySubject#"
        #IIF(formatType IS 'html', DE(type=""html""), '')#>

<cfmail> doesn't seem to like having variables or tags in it (<cfif>
doesn't work in there either). You can, of course, put variables
within attributes (to="#myTO#"), but it doesn't seem to want them
outside of the attribute quotes.

Also, it doesn't seem to work to the following sort of thing, because
CF server seems to think that if a "Type" attribute is present, then
the email should be HTML-formatted:
Type="#IIF(formatType IS 'html, 'html', 'plain')#"

How do I dynamically change the email's format type?

Thanks,
Jamie




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to