|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
I have a DB which is the base for an email application. The body of the emails can/will contain extra user information such as firstname, lastname.
These fields are stored in the DB just as they would be if called within a page (#firstname#, #lastname#). The problem I am finding is these bindings are not being processed by CF, they just show up as they are typed in. Any ideas how I can get these to process properly? Q. |
|
#2
|
|||
|
|||
|
Pleast post your code. You definitely can use variables inside a CFMAIL tag.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
|||
|
|||
|
Explanation 2
It's a little hard to explain but here's another try..
Page 1 - Client designs the body of the email in an htmlarea window inside of which the client can enter #firstname#, #lastname# wherever they like. This entry is stored in a DB. Page 2 - The client selects the member groups to send the email to. Page 3 - The CFMAIL script takes over fed by a bunch of queries. I hope this is a bit clearer. Q. |
|
#4
|
|||
|
|||
|
Oh if you are asking if you can store actual CFML code in the database (ie the text in the DATABASE is "abc #firstName# xyz"), then I don't believe you can make this execute (in any language).
The only possible thing I could think of would be to wrap the text in evaluate() but I don't even think that would work and if it did it would be slow. Basically, storing code in the database is a bad idea and a difficult proposition. |
|
#5
|
|||
|
|||
|
Solution
Tried doing a search for "CFML code in the database", it's funny I was trying to think of every way to search for this problem and didn't think of that one until you wrote it.
I did find a solution on forta.com, it is practically the same as what you said, the evaluate idea. Just thought I would post the answer that seems to work for me. #evaluate(de(myQuery.bodyText))# In order to allow my client to have the flexibility of customizing thier emails for each recipient, we have to take a little performance hit. C'est La Vie.... Q. (Thanks for you help) |
|
#6
|
||||
|
||||
|
You explain wierd, but what your talking about sounds a lot like a forum...stay with me.
1. username/firstname are stored hence you will see Alas as posting this message 2. My message which is this text im typing now will appear as the "message". 3. Both of these are being stored in a Database. That how you can read this. Is this what you are trying to create? ![]() |
|
#7
|
|||
|
|||
|
Kiteless actually hit it right on the mark. All is working just fine now.
Thanks. Q. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > bindings stored in DB |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|