You wouldn't have to write them all, just write a script that'll take a set
of "things", and then create combinations thereof.  Pass in the set of
attributes CFMAIL can accept, and let the machine write all the files for
you.  It can even write the logic for selecting the right file, if you want,
though that statement is going to be a BEAST, and probably slower to execute
than processing the dynamic template (at least on CF5).

Cheers,
barneyb

> -----Original Message-----
> From: Jamie Jackson [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 04, 2004 2:08 PM
> To: CF-Talk
> Subject: Re: Dynamically writing/running a CF tag?
>
> Hmm, that's one I hadn't thought of. However, I don't think I'm up for
> writing all those combos & logic (though your solution would execute
> faster).
>
> I award you 50 creativity points.
>
> Thanks for the idea,
> Jamie
>
> On Fri, 04 Jun 2004 14:16:56 -0600, in cf-talk you wrote:
>
> >Here's a silly thought...
> >
> >Why not create several templates with your <cfmail> tag, but
> each one with
> >a different combo of attributes? Then you simply call the
> appropriate
> >template based on what attributes you've got for that
> particular send.
> >
> >I don't know how many different attributes you've got to
> deal with, hence
> >can't say how many different combos it would result in...
> >
> >Either that, or have default values for those attributes
> that you use if
> >you don't have values coming from whatever source. So if you
> had a 'server'
> >var, you'd use it, but if not, use '127.0.0.1' (for itself)
> or some other
> >value as a default outgoing server. That would solve some issues.
> >
> >--Scott
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to