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

One of the most important features of the CodeTwo Signature Template Editor is the possibility to insert placeholders into email signatures. Placeholders are replaced with specific information (such as Active Directory attributes, 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 information 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.

Editor - insert placeholder
Fig. 1. How to add placeholders to a signature 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 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. {Counter 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. {Counter 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. {Counter 2}.

For more information on the placeholders listed above, see this section. 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 availability of placeholders depends on your environment and the CodeTwo software that you use. Different placeholders are displayed in the signature template editor if you use CodeTwo software for on-premises Exchange environments (e.g. CodeTwo Exchange Rules) and different if you work in an Office 365 organization and use CodeTwo Email Signatures for Office 365.

Warning

The signature template editor described here is not yet available in the CodeTwo Exchange Rules software family. If you use this software, see the manual for the previous version.

The software from the CodeTwo Exchange Rules family is targeted at on-premises Exchange Server environments. 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 signature template editor included in the CodeTwo Exchange Rules software family.

Placeholders 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
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.

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 signature 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 in CodeTwo Email Signatures for Office 365

CodeTwo Email Signatures for Office 365 is aimed at Office 365 environments. The program supports all the single-value attributes available in Office 365 (Azure Active Directory) and Azure AD Graph API. Multivalue attributes are currently not supported (see this article to check if an attribute is single- or multivalued). By default, the signature template editor shows placeholders with the most common Azure AD attributes as well as placeholders related to message properties, current date, etc. - you can see them in the table below. In some environments (such as hybrid deployments synced via Azure AD Connect) the list may contain more attributes (read on to find out more).

Placeholders in CodeTwo Email Signatures for Office 365
Message sender City, Company, Country, Department, Display name, E-mail, E-mail as link(1), First name, Initials(2), Last name, Notes(2), Office, P.O. Box(2), Pager(2), Photo(1), Postal code, State, Street, Title, Web page(2), Web page as link(1)(2)
Phone & fax:
Fax, Fax as link(1), Home phone(2), Home phone as link(1) (2), Mobile, Mobile as link(1), Phone, Phone as link(1)
Custom AD attributes:
CustomAttribute1-15
Message properties Message date, Message ID, Message subject, Recipient address, Sending server
Other Current date/time, QR Code image(1)

(1) Available only in the HTML format.
(2) Custom attribute (might require additional synchronization to be available).

Important

Placeholders may not work right after you configure your signature rules for the first time or after resetting Azure AD cache. This is because placeholder values are populated by cached data, not by data taken directly from your Office 365.

A cache mechanism has been added to speed up message processing and prevent software from querying your Azure AD too often. The software automatically refreshes its cache every 60 minutes. You can manually reset the Azure AD cache on the Manage tenant pages in CodeTwo Admin Panel. Learn more

Custom AD attributes

If you want to use additional Azure Active Directory attributes (such as CustomAttribute1-15, Initials, Home phone, etc.) in the signature template editor, these attributes need to be synchronized to CodeTwo Email Signatures for Office 365. Otherwise, they are not available on the list of placeholders. Learn how to use custom attributes in CodeTwo Email Signatures for Office 365

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 our freeware application, CodeTwo Active Directory Photos, to easily upload your photos to Active Directory (without having to run the Set-UserPhoto cmdlet separately for each user).

Learn how to add user photos to signatures in CodeTwo Email Signatures for Office 365
​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

Availability

This placeholder is only available in CodeTwo Exchange Rules & Exchange Rules Pro.

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

Availability

These placeholders are only available in CodeTwo Exchange Rules & Exchange Rules Pro.

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 signature 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. That is why you need to carefully choose the image size to always stay on the safe side. Otherwise, the last characters will be removed to fit the size limit.
  • You can change the properties of each placeholder by right-clicking it and choosing Edit placeholder.
  • The Preview window (Fig. 5.) always shows an image based on the current text. The QR Code image preview (Fig. 5.) 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 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).
Exchange Rules Pro unsubscribe placeholder
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.

Was this information useful?