Issue
- You want to modify the ESET Endpoint Encryption Server email templates
Solution
The EEE Server uses several templates to generate emails it sends to users. Template files and resources are stored in the Templates subfolder under the EEE Server installation folder. For example:
In version 2.5.0 to 3.7.0 C:\Program Files\EnterpriseConsole\Templates
In version 3.8.2 and later C:\Program Files (x86)\ESET Endpoint Encryption Server\Templates
We do not recommend directly editing templates, as future EEE Server installs could overwrite these files. We recommend adding your files and modifying the custom email template in 3.8.2 and later or the custom template reference object from version 2.5.0 to 3.7.0.
ESET Endpoint Server version 3.8.2 and later
Custom email template
Template files and resources are stored in the Templates subfolder under the EEE Server installation folder. For example: C:\Program Files (x86)\ESET Endpoint Encryption Server\Templates
. To create a custom template copy any of the following message types and rename the copy with _custom
suffix. For example, textmessage_custom.html or textmessage_custom.txt. These files will be preferred over any built-in files.
These can be edited easily by hand using a simple text editor. Each template has an HTML and plaintext format available.
Message type | Template |
testmessage;
|
Test Messages from the EEE Server control panel
|
activation_windows; |
Activation code message for Windows
|
activation_ios;
|
Activation code message for iOS
|
initiate_fde; | Start FDE on a workstation |
modify_fde_login; | Modify a user's Full Disk Encryption (FDE) login |
add_fde_login; | Add an FDE login for a user |
- zh-CN—Chinese - China
- zh-TW—Chinese - Taiwan
- nl-NL—Dutch - Netherlands
- en-US—English - United States
- fr-FR—French - France
- de-DE—German - Germany
- ja-JP—Japanese
- ko-KR—Korean
- pl-PL—Polish
- es-ES—Spanish – Spain
The language used for email templates is set up in the Generate Activation Codes window. Select the check box next to Send users Activation Code in an Email? and select the language.
Email template tags
Several tags can be used in email templates. You can add these tags to the EEE Server, which will replace them with appropriate text when the server generates the message. Templates can have both a text component, which is a basic text file, and an HTML component.
Generic tags
Activation tags
Full Disk Encryption (FDE) Tags
Include images
Templates can have both a text component, which is a basic text file, and an HTML component, which may include graphical images. Images should be placed in the same folder as the template and referenced directly in the template. When the EEE Server loads and parses the template, it will attempt to add the linked image to the message inline.
Include URLs
HTML can include URL links by using <a href=“URL”>Link Text</a>
. In a basic text file, add URLs in text form, for example, https://www.eset.com/
.
ESET Endpoint Encryption Server version 2.5.0 to 3.7.0
Edit the custom template reference object
Edit the reference object so the EEE Server can load and use the new templates. This file should be located in the EEE Server scripts folder. For example: C:\Program Files\EnterpriseConsole\Scripts
.The filename should be EmailTemplatesCustom.json as the JSON language defines this object.
The format describes five root message types that relate to the existing templates:
Root message type | Template |
testmessage;
|
Test messages from the EEE Server control panel
|
activation; |
Activation code message
|
initiatefde; | Start FDE on a workstation |
modifyfdelogin; | Modify a user's FDE login |
addfdelogin; | Add an FDE login for a user |
Below each of these nodes are sub-nodes for different languages. The en language must always exist as it is the default if the selected language is not found. Languages can be specified using either a standard ISO 639-1 2 letter code with optional variant code, in which case the EEE Server will reformat the appropriate language name. For example, the EEE Server would interpret the code en as English. Alternatively, the codes en-GB and en-US could provide different British and American English templates.
The default translations provided within the EEE Server are:
- en—English
- de—DE - German
- es—ES - Spanish
- fr—FR - French
- ja—JP - Japanese
- nl—NL - Dutch
- pl—PL - Polish
Activation messages can define separate templates for different platforms related to Windows or Mobile devices.
Within each language node, you can define the HTML and plaintext template filenames, the message's subject and any necessary phrases.
Email template tags
Several tags can be used in email templates. You can add these tags to the EEE Server, which will replace them with appropriate text when the server generates the message.
Generic Tags
Tag name | Description |
$adminName | The administrator's name, as defined in the EEE Server |
$userName | The name of the user, as defined in the EEE Server |
$messageCreationDate | The date the message was created |
$messageCreationTime | The time the message was created |
$messageURL# | A custom URL as defined by the template reference object |
Activation Tags
Tag name | Description |
$activationCode | The activation code text to type into the activation screen |
$activationURL | The activation code URL for click to activate |
$licenceType | The type of license |
$licenceDate | The time and date the activation code was generated |
FDE Tags
Tag name | Description |
$workstationName | The name of the workstation |
$workstationID | The workstation's ID |
$loginType | The type of login; could be Normal or SSO*1 |
$fdeLoginUsername | The FDE login username |
$fdeLoginPassword | The FDE login password |
$canChangePassword | The boolean text if the user can or cannot change the password*1 |
$rebootcount | The number of allowed reboots*2 |
$startMode | The chosen start mode (1-4)*1 |
*1 The template reference object defines the actual text that will be added.
*2 This tag occurs by default within the text for $startMode. If the value is a number it could indicate singular or plural. To avoid ambiguity or using a term such as reboot(s), use a special tag so the correct singular or plural form can be used automatically. Using the form {$rebootcount|reboot|reboots} means the email will correctly contain the text 1 reboot or 2 reboots depending on the actual value of $rebootCount.
Include Images
Templates can have both a text component, which is a basic text file, and an HTML component, which may include graphical images. Images should be placed in the same folder as the template and referenced directly in the template. When the EEE Server loads and parses the template, it will attempt to add the linked image to the message inline.
Add URLs to messages
URLs can be added to the message using the messageURL array, with each element in the array relating to the tags $messageURL1, $messageURL2 etc. Each object specified in the messageURL array can specify the link text, the actual URL (href), alt text and a target. The href is mandatory, and everything else is optional. For plaintext messages, only the href and text attributes are used. If text is specified, it will be prepended to the href, and the href is enclosed in parenthesis.
For example, consider the following JSON fragment:
"messageURL": [
{
"href": "http://www.eset.com/",
"text": "EEE Website"
},
{
"href": "https://support.eset.com/"
}
]
The tag $messageURL1 would expand to EEE Website (http://www.eset.com/) and $messageURL2 would be https://support.eset.com.
To specify text that applies only to the HTML template, use the element texthtml
. This can be useful if you want the text tag to include HTML, or an image, which would not be appropriate for the plaintext template.
Add custom templates
If you implement your own custom templates, only implement custom changes in EmailTemplatesCustom.json. If you edit EmailTemplates.json, an EEE Server upgrade will overwrite this file. You should use a lint to ensure your JSON is valid. If your file is not valid, it will be ignored by the EEE Server.