[Tip of the Week] Customizing Your E-mail Templates

ContentBox has a number of automated E-mails that it can send out-- from password resets, to comment moderation and author auditing. Each of the templates for these E-mails are found in the main “contentbox” module in the “email_templates” folder.

We make customizing these E-mails easy. Log into the admin using a user with the EMAIL_TEMPLATE_ADMIN permission and click “Email Templates” under the “System” menu. Here you will see a list of all the current E-mail templates and you can edit any of them right there from the interface. Here’s an example of one:

Dear @name@,
In order to reset your ContentBox password you must first click on the link below so we can verify you first.

Click here to reset password

Reset Link: @linkToken@

The values enclosed in @ characters are tokens that will be replaced with the actual values when the E-mail is sent. Any CFML code is valid here, and you have access to any ColdBox settings and the cbHelper object.

P.S. Make sure you only give the permissions necessary to your users. A feature like this is very powerful and could allow a malicious admin user to place naughty code in the .cfm E-mail templates. Make sure you guard your ContentBox logins and don’t simply make everyone an admin.



ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com