I want to send mail with Email Template Engine feature , How can I do this easily ?
I want to save templates in database and replace some fields and send mail , my question is about how to replace fields? Here is my email template that contains all my needs
Dear {fullname}
Here is new products list
{foreach products as product}
ID :{product.id}
name :{product.name}
{/foreach}
I just need a simple template engine class that apply to my template string( not template file)