How can I modify email templates used by the ESET Endpoint Encryption Server?
|
|||||||||||||||||||||||||||||||||||||||||
This article applies to ESET Endpoint Encryption (EEE) Server 2.5.0 or later onlyThe EEE Server contains a number of template which is uses when generating emails sent to users. These emails could be for different reasons, such as supplying the user a new activation code or informing them of changes to the FDE status on a workstation. These templates can be easily adapted to suit your own corporate identity, or new custom translations can be added. Template files and resources are stored in the Templates sub folder under the EEE Server installation folder. For example this could be C:\Program Files\EnterpriseConsole\Templates. You can edit these directly, however it is recommended you DO NOT do this as any future EEE Server install could overwrite these files and you would be forced to redo your changes. A better solution is to add your own files and modify the custom template reference object. See below. Including ImagesTemplates can be both a text component, which is a basic text file, and an html component which may include graphical assets. Assets 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 assets as inline attachments to the message. Please review the existing templates for reference. It is important that image tags must be complete across a single line e.g. <img src="image.png">. Altough it is valid in HTML to split the tag so a line break can occur between the "img" and "src" parts, the EEE Server will not parse the tag unless it is a single line tag. Email template tagsEmail templates can make use of serveral tags. You can add these to the EEE Server and they will be replaced with appropriate text when the EEE Server generates the message. The following tags can be used: Generic Tags
Activation Tags
FDE Tags
*1 The actual text that will be added is defined in the template reference object. See EmailTemplates.json or EmailTemplatesCustom.json *2 This tag occurs by default within the text for $startMode. Beause this value is a number that could indicate singular or plural, to avoid ambiguity or using a term such as "reboot(s)", you may 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. Editing the custom template reference objectOnce you have your own templates ready to use, you need to edit the reference object so the EEE Server can load and use the new templates. This file can should be located in the EEE Server scripts folder. For example this could be C:\Program Files\EnterpriseConsole\Scripts. The file name should be EmailTemplatesCustom.json. This object is defined by the JSON language. This allows a complex object to be defined simply in a text file. This can be edited easily by hand using just a simple text editor. If you wish to edit the object, or create your own custom object, you should contact support. The format can be fairly complex if you are unfamiliar with the JSON notation. However, broadly speaking the format describes 5 root message types:
These relate to the templates for:
Below each of these nodes are sub nodes for different languages. The "en" language is used as a catch-all, which is used as the default if the selected language is not found for example. Thus the "en" version MUST always exisit. 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 approiate language name. For example the EEE Server would interpret the code "en" as "English". Alternatively the codes "en-GB" and "en-US" could be used to provide different templates for British English and US English. The default translations provided with the EEE Server are currently:
In addition, activation messages can define seperate templates for different licence groups. Currently these relate to 1 - Windows or 2 - Mobile (iOS) licences. Within each language node, you can define the html and plaintext template filenames, the subject of the message, and any necessary phrases. Adding URLs to messagesURLs 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 specifiy the link text, the actual URL (href), alt text and a target. The href is mandatory, 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 enclosed in parenthasis. For example, consider the JSON fragment "messageURL": [ Then the tag $messageURL1 would expand to "EEE Website (http://www.eset.com/)" whereas $messageURL2 would simply be "http://support.eset.com". If you wish to specify text that applies only to the HTML template, you 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 plain text template. Adding custom templatesIf you choose to implement your own custom templates, you should do these only in EmailTemplatesCustom.json. If you edit EmailTemplates.json this file will be overwritten by an EEE Server upgrade. You should use a lint to ensure your JSON is valid. If your file is not valid, it will simply be ignored by the EEE Server. A useful JSON lint site is: http://jsonlint.com/ Supported VersionsEEE Server 2.5.0 or later only Keywords: Customise, Customize, Email, Change, | |||||||||||||||||||||||||||||||||||||||||
|