Conditional placeholders in email signatures and disclaimers

In addition to regular placeholders, CodeTwo Exchange Rules lets you take advantage of the so-called conditional placeholders that you can insert into signature and disclaimer templates.

While a regular placeholder is always replaced with the same value of a selected Active Directory (AD) attribute, a conditional placeholder can be replaced with one of several values, depending on which condition you defined has been met. You can use:

  • AD attributes,
  • a custom text,
  • an image,
  • an HTML code snippet,

as a conditional placeholder’s value.

Examples of use

You can use conditional placeholders in your templates to insert:

  • a fallback phone number if an email sender is missing this property in Active Directory (AD);
  • a different address of a company branch, depending on e.g. sender’s City attribute value;
  • a different phone area code, depending on sender’s user’s Country attribute value (as shown in Fig. 1. below);
  • and so on.

How it works

To use a conditional placeholder, you need to create it first. To do so, open the template editor and Placeholder > Conditional placeholders > Manage to open the Conditional placeholders manager (Fig. 1.). Learn more

A conditional placeholder can have any number of rules. Each rule consists of a condition (based on a sender’s AD attribute) and a value.

When the program inserts your template into an email, a conditional placeholder is replaced with the value defined for the first rule whose condition has been met. If none of the conditions is met, the placeholder will be replaced with the default value that you also need to specify for a given conditional placeholder (see the bottom part of Fig. 1.).

An example of using a conditional placeholder to insert an appropriate country code before sender’s phone number (depending on the Country attribute’s value).
Fig. 1. An example of using a conditional placeholder to insert an appropriate country code before sender’s phone number (depending on the Country attribute’s value).

To learn about conditional placeholders in detail (including how to add, configure, and edit them), read this article in the template editor user’s manual.

In this article

Was this information useful?