About creating a new Email Template
4 posts by 2 authors in: Forums > CMS Builder
Last Post: April 5, 2018 (RSS)
By andreasml - April 4, 2018
Hello to everyone
I cannot understand how the Email Templates really work. I can construct the content of the email, but I cannot understand how I will make this template running. How will I connect it to a specific action, i.e. when this email template will be activated?
By leo - April 5, 2018
Under your email template section advanced commands drop down (bottom left), there is an option "Developers: Show sendMessage() PHP". This option will take you to a page that lists all the sendMessage() functions for each template. And by calling those sendMessage() functions the email will be sent with the set data. You can also specify what placeholders to use for the template as well.
Let me know if you have any questions!
By andreasml - April 5, 2018
Unfortunately it is not very clear to me
For example, I want to send an automatic email to each user I create, with all his info (email, username, password etc). How will I do it?
Thanks in advance
By leo - April 5, 2018 - edited: April 5, 2018
If you are using our membership plugin, I think that does send email to all new user by default with the template USER-SIGNUP. But anyways here is the step you should do to add code that sends an email template:
1. Find out where (or when) you want to send it. For example user notification email, you would probably like to send them right after the account is created and saved in the back-end. Could be somewhere on the signup page
2. Get the sendMessage() code from the "Developers: Show sendMessage() PHP" option in the advanced option dropdown. Copy and paste it into the location you want the email to be sent
3. Modify sendMessage() function if you want to customize placeholders or just assign correct data to the placeholders that will be used in the email template
That's the detailed process. Hope that helps you! And if you want you can always send a ticket to email@example.com and we will help you set things up.