Editing SMTP message templates

If you want to change the templates used to send SMTP messages, you'll need to go to the Venafi Configuration Console (VCC) (or use the Tools MMC snap-in).

To open the template editor

  1. In VCC, go to ToolsLoggingChannels.

  2. Click Manage Templates in the actions panel.

  3. Do one of the following:

    • To modify an existing template, click its name, then click Edit.

    • To edit a copy of an existing template, click its name, click Duplicate, and then click Edit.

    • To create a new template from scratch, click New.

Using the Template Editor

The template editor is a robust tool for crafting both HTML-based and plain text message templates. Both versions of the message are sent to recipients; their email system determines which version of the message to display.

You can edit the template name and author in the bottom right corner of the Template Editor.

Working with macros, images, and variables

There are three types of dynamic content used in the Template Editor: Macros, images, and variables.

Macros

Macros are keyword-based commands enclosed by a single $ symbol. They pull system information into notifications. For example, $IdentityEmail[<PrefixedUniversal>]$ would insert the corresponding certificate owner's email.

Macros are available in the menu across the top of the Template Editor. Click Documentation to see reference documentation for the selected macro. (To hide the help window, click Documentation again.)

Images

Images are variables enclosed by three $$$ symbols and are always the value of the src= attribute. For example: <img src="$$$Venafi-Icon$$$" />

To learn how to manage images, see Managing logos and images used in email templates

To insert an image into the message at the current position, click the logo title, then click Insert Image Reference.

Variables

Variables are units of dynamic content that will be replaced with specific content defined in the individual SMTP channel settings. When you have multiple templates, you'll see a couple of different groupings of variables. Shared variables are variables that exist in all templates. Conversely, custom variables only exist in a subset of templates.

When possible, we recommend you use shared variables as much as possible. Using shared variables makes your templates more useful because they can be used by emails that use any of the templates. If you use custom variables, you need to make sure the message settings in the SMTP channels match the variables of their templates.

In the Template Editor, you create and use variables by surrounding text with three $$$ symbols. For example, this is a shared variable called title: $$$Title$$$.1

For example, if you have a detailed internal knowledge base, and you want to provide a link to different KB articles for different SMTP channels, you could create a variable called $$$KbUrl$$$. You could then define that URL for each SMTP channel in the Edit Message window. 2

When you create variables, you can see them in the Detected Variables panel. On the right of the detected variable name you can see if the components were found in the HTML or Plain text versions of the message. To find the component's location in the email, click the name in the variable list, then click Go to variable.

One notable feature is the ability to nest variables. This means a variable can contain one or more other variables, allowing you to create reusable combinations of variables. If the system detects a recursive variable (a loop where a variable contains itself somewhere in the definition), it will output the loop five times, and will then stop generating. This helps you visually identify cases of recursive variables so you can hopefully fix them before the broken messages get sent to your users.

HTML and plain text messages

SMTP messages should be created in both the HTML and Plain text tabs. Depending on the recipient device and software, either the HTML or plain text version of the message may be shown to users. For example, if the SMTP channel target is a modern email system, the HTML version would likely be displayed. However, if the SMTP channel target is an SMS destination, the plain text version would be displayed.

In the HTML tab, you can use standard HTML syntax, including CSS in the style element, as well as inline CSS. The Preview window shows you a visual rendition of what the message will look like.

Individual SMTP channels can be set to only deliver plain text versions, if needed. This is useful, for example, if the resulting email will be automatically processed by another system where a plain text version is preferable.

Saving your changes

Make sure you save your changes before you close the window. Once your changes are saved, all SMTP messages that use this template will be sent with the updated settings.