The editor described in this manual is featured in the following CodeTwo products:

CodeTwo Exchange Rules Pro (product page | user's manual)

CodeTwo Exchange Rules (product page | user's manual)

Use placeholders to create email signatures that adapt to the email sender

One of the most important features of the CodeTwo Template Editor is the possibility to insert placeholders into email signatures. Placeholders are replaced with specific information (such as Active Directory attributes/variables, counters, message details, and more) when a signature is added to an email message. Instead of typing every signature detail manually, you can use CodeTwo software to pull variables such as the sender's name and contact data from AD. This way you can create signature templates that change dynamically depending on who sends an email, the current date and time, and so on. See the sections below to learn more.

How to add or modify a placeholder

To add a placeholder into a signature template, select (click) a place inside your template where you want to add it, then click the Placeholder button on the ribbon and choose a placeholder from the list (Fig. 1.). Inserted placeholders are surrounded with curly brackets/braces { } to be recognized by the program. You can also add placeholders manually by typing their names inside braces ({Placeholder name}), but not all types can be added this way.

How to add placeholders to a template.
Fig. 1. How to add placeholders to a template.

Once a placeholder is added, you can modify its properties on the Placeholder tab (the tab appears when you click a placeholder) or by right-clicking it and choosing Edit placeholder from the shortcut menu. The available options depend on the placeholder, and not every property can be changed. Some settings are common for most placeholders. For example, the Formatting option allows you to specify the letter case of the AD attribute that will be inserted (Fig. 2.).

Editor - placeholder properties - Formatting
Fig. 2. How to change the letter case of the AD attribute value pulled into a placeholder.

Important

You cannot manually insert (by direct typing or copying and pasting) the following placeholders:
Rotating image, Rotating text, Unsubscribe link, Message date, Counter, Current date/time, QR Code image, and additional (custom) AD attribute placeholders.

These placeholders require additional configuration to be correctly recognized. If you add them manually, they will be treated as standard text. You need to insert them via the Placeholder button so that each of these placeholders gets a numerical ID (e.g. {Message date 1}). The editor remembers the added placeholders and their insertion order. So if you delete a placeholder added in this way and want to restore it, you need to type its name and ID manually (e.g. {Message date 1}) and the program will recognize it. To add another placeholder of the same type, use the Placeholder button again: the newly added placeholder will be numbered accordingly, e.g. {Message date 2}.

For more information on the placeholders listed above, see this section. Additional (custom) AD attribute placeholders are explained in section Available placeholders.

To see how placeholders look like when they are replaced with real data, use the Preview (Editor - Preview button) button. Learn more

What happens with my signature if a placeholder is empty?

There may be situations when a placeholder in an email signature cannot be replaced with information, for example because the related attribute in Active Directory has no value for the email sender. This leads to empty spaces in the signature layout. You can prevent this from happening by using Remove Text tags (RT tags) to automatically remove empty lines from your signatures.

Learn more about this feature

Available placeholders

The available placeholders are mostly based on Active Directory (AD) attributes, with some additional placeholders such as counters or QR Code generators. The software caches the values of AD attributes locally (and refreshes this data once per hour) to use them in email signatures. CodeTwo does not have access to your AD attributes - they can only be accessed by authorized people in your organization.

Below you can find a list of the placeholders available by default in the template editor included in the CodeTwo Exchange Rules software family.

Placeholders (variables) in CodeTwo Exchange Rules & Exchange Rules Pro
Message sender City, Company, Country, Department, Description, Display name, E-mail, E-mail as link(1), First name, Initials, Last name, Notes, Office, P.O. Box, Pager, Photo(1), Postal code, State, Street, Title, Web page, Web page as link(1)
Phone & fax:
Fax, Fax as link(1), Home phone, Home phone as link(1), IP phone, IP phone as link(1), Mobile, Mobile as link(1), Phone, Phone as link(1)
Exchange attributes:
ExchAttr1-15
Dynamic content Rotating image(2), Rotating text
Message properties Message date, Message ID, Message subject, Recipient address, Sending server
Counters Counter, Unique counter
Conditional placeholders(3) Here you can create a conditional placeholder (or choose an existing one). Each conditional placeholder has one or more conditions and each condition is assigned a value. When adding a signature to an email, each conditional placeholder will be replaced with the value assigned to the first condition that is met. Learn more about conditional placeholders
Other Current date/time, QR Code image(1), Unsubscribe link

(1) Available only in the HTML format.
(2) Available only in the HTML and RTF format.
(3) Available to use with the Auto respond (CodeTwo Exchange Rules Pro only), Apply full composition, Insert Declaimer, and Insert signature actions.

Custom AD attributes

Apart from using the predefined set of AD attribute placeholders (see the table), you can also use your own Active Directory attributes as placeholders. To make them available in the template editor, you need to first define them in the Additional AD attributes section in the program's settings.

Tip

The usage of placeholders is not limited to signatures. You can also add them when you define recipients of forwarded messages in CodeTwo Exchange Rules Pro. Learn more

Placeholders that require additional configuration

As explained earlier, some placeholders require additional configuration and that is why you cannot insert them by typing their names directly inside your template. Read on to learn more about them.

The Photo placeholder

This placeholder is used by the program to pull your users' photos from Active Directory and insert them into emails. Once you add it to your template (Fig. 3.), you can:

  • insert photos in original dimensions,
  • adjust the dimensions to a desirable size in pixels.

While customizing the size of your photo, type one dimension (this way the program will scale the photo, keeping its original aspect ratio) or both dimensions (the program will scale the photo to the selected values).

Editor - Photo placeholder
Fig. 3. The Photo placeholder's configuration window.

Tip

You can use CodeTwo Active Directory Photos for free to easily upload your photos to on-premises Active Directory (without having to run the Set-UserPhoto cmdlet separately for each user).

​Learn how to add user photos to signatures in CodeTwo Exchange Rules
Learn how to add user photos to signatures in CodeTwo Exchange Rules Pro

The Web page as link placeholder

This placeholder allows you to pull a web page address from your Active Directory and insert it as a valid hyperlink. The web address value in your AD should be preceded by a proper protocol definition (like HTTP or HTTPS). In the case when this information is missing, the program will automatically append the HTTP protocol to the very beginning of the link.

The Rotating text and Rotating image placeholders

When you use the Rotating image / Rotating text placeholder, an image or text sample is randomly or sequentially picked from a specific folder every time a message goes through your Exchange Server. These placeholders are useful when you have several text pieces or graphics and you want to insert them and swap them with each email you send. For example, you have multiple marketing banners and want to randomly insert them to your email signature.

To add this type of placeholder, go to Placeholder > Dynamic content and choose Rotating image or Rotating text. You need to define FolderPath (the folder from which text/images should be pulled) and WorkingMode (you can select random or sequential working mode). To limit which file types should be included in the process, use the FileMask option (Fig. 4.). In the case of Rotating text, you can also set the Formatting field (see Fig. 2.) to change the letter case of the inserted text.

Editor - Rotating image placeholder
Fig. 4. The {Rotating image} placeholder's configuration window.

See this article to learn how to create signatures with dynamically changing image links.

Date and time related placeholders

You can customize the date and time format in many different ways. For guidelines, see this article.

Counters

The Counter placeholder lets you add a counter to your template. The counter shows a numerical value that increases by 1 with each sent email (if the sender meets the conditions of the rule that adds this counter). If you use this placeholder more than once in a single template, the counter will display a different, higher value in every place where it appears in the template. You can also configure this counter to be automatically reset after a certain period (the ResetMode setting). Example: You create a rule that adds a signature with a single counter to all internal emails. Once you apply this rule, each internal email (including replies and forwards) will have a different number in the signature (the first email gets number 1, the fifth - number 5, etc.).

The Unique counter placeholder generates a random string of letters and digits, for example: 6HG12422. If used more than once, the counter displays a different value on every occurrence.

The QR Code image placeholder

This placeholder allows you to add a QR code image based on text or information pulled from your Active Directory to your template. When you configure this placeholder (Fig. 5.), you can type any text and/or add placeholders, and it will all be changed into a QR Code image. You can also change the size of the QR Code image based on the number of characters to be included. If you use placeholders, you need to remember that:

  • Placeholders will be replaced with different values. These values (e.g. AD attributes) can sometimes exceed the number of characters allowed by the image size you selected. If this happens, the program will automatically increase the size of the inserted QR Code image. The maximum limit is 1476 characters. If you go beyond this limit, your text may be trimmed.
  • You can change the properties of each placeholder by right-clicking it and choosing Edit placeholder.
  • The Preview section always shows an image based on the current text. The QR Code image preview is based on placeholder names, not on their actual values. In your email, placeholder names will be replaced with values, and the generated QR Code image will change accordingly. In most cases, you can use the Preview (Editor - Preview button) button on the ribbon of the editor to see the real QR Code for a specific user.

Editor - QR Code image placeholder
Fig. 5. The QR Code image placeholder's configuration window.

See this Knowledge Base article to learn how to insert vCards as QR codes into email signatures.

The Unsubscribe link placeholder

Availability

This placeholder is only available in CodeTwo Exchange Rules Pro.

This placeholder can be used to insert a personalized unsubscribe link to external emails. Such a link adds the recipient who clicks it to a certain blacklist and prevents them from getting messages from a particular sender, group or even the whole company. Inserting the unsubscribe link placeholder is not enough - you need to combine it with the Block message action to take full advantage of the unsubscribe feature. Learn how to use the unsubscribe mechanism in CodeTwo Exchange Rules Pro

When you add the Unsubscribe link placeholder via the Placeholder button on the ribbon, the configuration window opens (Fig. 6.) in which you can:

  • select a blacklist to which the email address of the recipient who clicks the unsubscribe link should be added. Note that you can manage the blacklists and the recipients included via the Recipients blacklists tab in the program's settings. Learn more
  • decide how the unsubscribe link should be displayed in an email;
  • define the page that pops up and informs the person who clicked the link that they are now unsubscribed. You can select a default landing page provided by CodeTwo (you can customize the information shown on this page and add a placeholder that is replaced with the recipient's email address) or use any other web page by typing its URL (this option does not allow you to customize the text; the only customization is to add the recipient email address placeholder to the URL).

The Unsubscribe link placeholder's configuration window.
Fig. 6. The Unsubscribe link placeholder's configuration window.

You can change the placeholder's configuration at any later time by right-clicking it and selecting Edit placeholder from the shortcut menu or via the Placeholder tab on the ribbon, as explained earlier.

In this article

Was this information useful?