I am new to php and want to make email management module at admin for managing emails text which go to user while registration,activities. just want to have utility for editing text. I want to know the standard way to do this.
I will use editors at back end and put the whole text in database tables But as you know there is always user’s names,emails,password which will come in between the text. how can I manage it in best way??
Thanks
This depends entirely on what your trying to set up.
I generally give clients a specific area of the email that they have control over (usually just plain text). Just store that text in the database then pull it out whenever you are sending the email out.
The rest of the email is a template controlled by me, and generally its in the template that any variables get output (e.g. the customer name).
If however your wanting to give them more control you’d need to set up some kind of keyword replacement functionality into the email. Something like if you type in
{FirstName}for example it would replace it with the first name of the person it’s sending the email to.Then all you need to do is str_replace these keywords when you go to send the email.