This article is intended for self-hosted customers. If you're a SaaS customer and want to edit your email templates, contact your account manager or submit a support ticket.
Email templates are located in the emailTemplates folder on the server where NetX is installed. For example, on Windows:
C:\Program Files\NetXposure\netx\emailTemplatesOpen any template in an HTML editor to customize it. Avoid word processors like MS Word, as they introduce extraneous markup.
Template file types
Each template can have up to three versions:
- Working version: the active file NetX uses to generate emails (e.g.
downloadApprovalAdmin.tpl) - Default version: the fallback used to regenerate the working version if one is missing (e.g.
downloadApprovalAdmin-default.tpl) - Custom version: an optional override created by copying the default file and replacing
-defaultwith-customin the filename (e.g.downloadApprovalAdmin-custom.tpl)
How NetX resolves which template to use
When a template is called, NetX checks in this order:
1. If a -custom version exists, it generates a new working version from it.
2. If no custom version exists, it uses the existing working version.
3. If no working version exists, it generates one from the -default version.
To restore a template to its default state, delete the working version and ensure no custom version is present in the emailTemplates folder. Do not delete -default templates.
AutoTask templates
Custom templates for use with AutoTasks must follow this naming convention: autotaskNotifyXxx.tpl, where Xxx is a descriptive camel-case name.
Template variables
Templates contain variables (e.g. ${downloadApproval.userLabel}) that NetX populates with values at send time. Only the variables present in the default template are valid for that template; removing a variable will omit its value from the email. To see a full list of variables for each email template, see List of Email Templates.
Sample edits
You can add custom content anywhere in the template body: company contact information, disclaimers, and so on. You can also edit existing labels, for example, changing Files to Approved Files.
When you're done editing, save the file with a -custom.tpl suffix in place of -default.tpl and place it in the emailTemplates folder on the server. Changes take effect after the server is restarted, or after running the reload job described below.
Customizing the subject line
To customize a template's subject line, use the property format below:
| Property | Description |
|---|---|
email.subject.TEMPLATENAME |
Customizes the subject line for a specific template. Use the template filename without the Value options: subject line, in text Requires restart: Yes, or run the template loader job |
Reloading templates without a restart
After editing your templates, you can reload them by running the following job:
| Job | Description |
|---|---|
com.netxposure.exogen.email.EmailTemplateLoaderJob |
Flushes the email template cache and reloads all templates. |