Skip to main content
Known Participant
April 16, 2009
Answered

Variables Inside a variable in CFmail?

  • April 16, 2009
  • 1 reply
  • 415 views

Hey all!  Thanks in advance for the help on this...

I'm trying to submit an email with a variable in it.... example:

<cfmail to="#camperdetails.cEmail#" from="sepcampapp@seprevived.com" username="sepcampapp@seprevived.com" password="xxxxx" server="xxxxxx" subject="#msubject#" type="html">
#campdetail.camperaccept#
</cfmail>

However, the camperaccept variable is dynamic and has variables stored inside.  For instance, it could have #campdetail.campername# in it.

Whenever I receive a test email on this, the #campdetail.campername# comes across just as that, as text, rather than pulling down the actual variable.  I've tried using the <cfoutput> tags as well.

Any thoughts on how to make that content actually dynamic?  The problem is that I can't just parse out the variables because those variables are user defined, so they have to be pulled from a database entry.

Let me know if you have any insight, it would be greatly appreciated!

JE

This topic has been closed for replies.
Correct answer ilssac

Answered the other day in another list:


http://forums.adobe.com/thread/416669?tstart=0

The idea is to use the evaluate() and de() functions together to do this sort of thing until such a time as one can rework such problematic code.

<cfmail to="#camperdetails.cEmail#" from="sepcampapp@seprevived.com" username="sepcampapp@seprevived.com" password="xxxxx" server="xxxxxx" subject="#msubject#" type="html">
     #evalute(de(campdetail.camperaccept))#
</cfmail>

1 reply

ilssac
ilssacCorrect answer
Inspiring
April 16, 2009

Answered the other day in another list:


http://forums.adobe.com/thread/416669?tstart=0

The idea is to use the evaluate() and de() functions together to do this sort of thing until such a time as one can rework such problematic code.

<cfmail to="#camperdetails.cEmail#" from="sepcampapp@seprevived.com" username="sepcampapp@seprevived.com" password="xxxxx" server="xxxxxx" subject="#msubject#" type="html">
     #evalute(de(campdetail.camperaccept))#
</cfmail>