minotaur77
Programmer
I am trying to add a personal touch to emails using the cfmail tag. What I want to do is include in the header of the newletter the persons first name and/or company. I want to be able to evaluate the text field replacing all cf variable listed in it with the corresponding values from the query. Here is the code:
<cfloop query="GetEmails">
<cfquery name="GetEmail">
SELECT *
FROM LogixNewsletter
WHERE HTML <> 0
AND Subscribed <> 0
AND Email = '#Email#'
</cfquery>
<CFMAIL query="GetEmail" TO="#GetEmail.Email#" FROM="#Form.From#"
SUBJECT="#Form.Subject#" TYPE="HTML">
#FORM.nltext#</CFMAIL>
</cfloop>
I want to evaluate the variable #form.nltext# so that an instance of #FirstName# in the text value of the field would be replaced with the persons name.
<cfloop query="GetEmails">
<cfquery name="GetEmail">
SELECT *
FROM LogixNewsletter
WHERE HTML <> 0
AND Subscribed <> 0
AND Email = '#Email#'
</cfquery>
<CFMAIL query="GetEmail" TO="#GetEmail.Email#" FROM="#Form.From#"
SUBJECT="#Form.Subject#" TYPE="HTML">
#FORM.nltext#</CFMAIL>
</cfloop>
I want to evaluate the variable #form.nltext# so that an instance of #FirstName# in the text value of the field would be replaced with the persons name.