Imagine this scenario, I have a table called "message_templates" with the following structure:-
id
subject
body
where the body value is:-
<p>ID: ${PROJECT_ID} </p>
<p>Project's Title: ${PROJECT_TITLE} </p>
What is the best way to substitute theses variables in CakePHP - I know it, CakeEmail has a Configuration parameter called "template" but its not the case, because my template(body column) comes from database. Maybe use preg_replace
or sprintf
before send?
Somebody could help me?