Question
Variable inside a variable
Hi all,
I am building a mailer to allow a client to copy and paste their html email data into a form field and allow them to mail merge the data to their client database. The email should be sent to all records of the users table and should include the users name in the body of the email.
I almost have it working perfectly, but my problem lies in the variable name for the users name being included in the pasted html instead of the value of the variable.
The process is as follows:
1. The administrator copies and pastes their html into a form page
2. The administrator adds the relevant variable to the text of the email, in this case, #firstName#
3. The administrator hits submit and the form is posted to a page that loops through all records on the user tables and sends the email to each of the addresses and *should* include the user name in the email text
The problem is that if the administrator enters
"Dear #firstName#," into the html form, the email will actually display #firstName# as text.
Can anyone offer any advice on how to get my cfmail inside a cfloop to replace #firstName# with the value of the first name.
TIA<
Paul
I am building a mailer to allow a client to copy and paste their html email data into a form field and allow them to mail merge the data to their client database. The email should be sent to all records of the users table and should include the users name in the body of the email.
I almost have it working perfectly, but my problem lies in the variable name for the users name being included in the pasted html instead of the value of the variable.
The process is as follows:
1. The administrator copies and pastes their html into a form page
2. The administrator adds the relevant variable to the text of the email, in this case, #firstName#
3. The administrator hits submit and the form is posted to a page that loops through all records on the user tables and sends the email to each of the addresses and *should* include the user name in the email text
The problem is that if the administrator enters
"Dear #firstName#," into the html form, the email will actually display #firstName# as text.
Can anyone offer any advice on how to get my cfmail inside a cfloop to replace #firstName# with the value of the first name.
TIA<
Paul