[thelist] ColdFusion question

jeff jeff at members.evolt.org
Tue Apr 3 20:50:00 CDT 2001


: From: Ryan Carmody
: I'm trying to store an email template
: in a DB field.  The email template contains
: coldfusion (cfif and cfoutput tags) that
: format the email and insert info from queries.
: I've tried using the evaluate(string) function,
: but that just outputs the email template as text
: with the coldfusion still there unevaluated.  It's
: almost as if I need to send the email template
: through CF server twice.  Can anyone help me here?

easy, just get the email template from the database, use cffile to write it
out to a file, open <cfmail> <cfinclude> the newly written file and then
close the </cfmail>.  the included template gets parsed, coldfusion tags get
executed and everything's cool.

you can then delete the written file or keep it for future use.

good luck,


mailto:jeff at members.evolt.org

More information about the thelist mailing list