In CF5, I've written a wrapper for the <cfmail> tag so that it does
multipart emails (HTML + Text + attachments, etc.). Right now, I
construct the final <cfmail> tag as a variable, then I write that
variable (the cfmail tag) to a file, then include it, then delete it.
This is inefficient, but it is to get around the fact that you can't
do things like this:

<!--- can't conditionally include attributes --->
<cfmail from="#attributes.from#" to="#attributes.to#"
<cfif
  isdefined("attributes.server")>server="#attributes.server#"</cfif>
<cfif
  isdefined("attributes.port")>port="#attributes.port#"</cfif>
<cfif
  isdefined("attributes.query")>query="#attributes.query#"</cfif>
/>

Is there some way around the file write/include/delete method? ...Any
ideas at all?

Thanks,
Jamie
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to