On Fri, 4 Jun 2004 11:20:25 -0400, in cf-talk you wrote:

>> From: Jamie Jackson
>>
>> 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?
>
>I'm not sure about QUERY, but I'm pretty certain that SERVER and PORT
>can be left blank
>
>So you could do
>
><CFPARAM NAME="attributes.server" default="">
><CFPARAM NAME="attributes.port" default="">
><CFMAIL FROM="#attributes.from#" TO="#attributes.to#"
>SERVER="#attributes.server#" PORT="#attributes.port#">
>
>You can't put a CF tag within the main part of another CF tag, you can
>in the content part of it, but not in the "building" part of it

Right, I thought I might be able to default server and port to either
blank, or dynamically determine the CF-default server, and default the
port to 25.

However that still leaves the query attribute. As a rule, I don't use
the query attribute, anyway, but others in my organization might. Is
there no way around this hurdle, other than the workaround I'm already
using?

(I'll be happy with a "no" answer, as long as it's definitive.)

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

Reply via email to