> Hi all,
> I am making some changes to one of our apps that our sales people use
> for emailing to customers. We have an interface that the sales people
> can use to create their own emails and get stored in a db, I need to
> allow the customerid that identifies the customer to be displayed in the
> body of the message, but only for one particular message. Is there a way
> to put my customerid into the form field that goes into the database and
> be able to grab the actual value of it when it sends out the email.
> Right now if I create a new email and put in #customerid# the email
> displays it exactly as that. I need to show the actual value that is
> there.
There's a couple of ways you can do this... There are a few UDF's and custom tags
which will evaluate variables within a string ( such as this one being pulled from the
db ), or you can write it to a file and then include the file in the cfmail ( probably
the solution I would use ) ... Something like ...
<cffile action="write" file="d:\cfmailcontent\#query.tableid#.cfm"
output="#chr(asc('<'))#cfoutput>#query.tablecontent##chr(asc('<'))#/cfoutput>">
Then when you cfinclude this file in the cfmail, any variables within the query column
will get evaluated.
<cfmail ...><cfinclude template="../../../cfmailcontent/#query.tableid#.cfm"></cfmail>
hth
Isaac Dealey
www.turnkey.to
954-776-0046
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists