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

Nope, just tried it. If the attributes are present, it expects valid
values. I could probably determine the defaults for some of these
(using maybe cfregistry to get the default mail server, etc.), but I
think it might approach the overhead of the write/include/delete
method.

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

Reply via email to