<SNIP>
        I am trying to set up a mail system that can grab text from a database and
insert it into a mail message. I also need to customize the text of the
message (e.g. Dear #first_name# evaluates to Dear John). The problem arises
when I insert the mail text variable into the <cfmail> tag. The variables
that are contained in the text message are not evaluated.
<cfmail ..>
        #mail_message#
</cfmail>
This will output "Dear #first_name#, ..."

How do I get the sub variable to be evaluated?
</SNIP>

Neil,
        Are you querying the database first?  Try to do something like this:

<CFQUERY NAME="Query" DATASOURCE="DSN">
SELECT *
FROM SomeTable
</CFQUERY>
blah blah blah
<CFMAIL QUERY="Query"...>
Dear #first_name#,
blah blah blah
</CFMAIL>

See if that works for you!

Chris Ivey

MTS Systems Engineer
GTE Data Services: Temple Terrace, Florida
TSS Distributed - WAN Tools Group
Office: (813) 978-4844
Pager: (813) 303-1177
AIM: IveyAtGTEDS

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to