How to remove the parts of signatures (placeholders) that have not been replaced by data from AD

Problem:

Your email signature template contains placeholders that are dynamically filled with Active Directory attribute values. If a user has an empty attribute in AD, the signature will have an empty space instead of the corresponding placeholder. This article shows how to have these dynamically filled parts of signatures removed on the fly when they cannot be replaced with data from Active Directory.

Solution:

Software from the CodeTwo Exchange Rules family features a built-in capability to process RT (Remove Text) control tags. RT tags are particularly useful for signatures/disclaimers that include Active Directory placeholders: if a placeholder cannot be filled with value because the corresponding data is missing in Active Directory, this placeholder will be automatically removed by CodeTwo software if it is surrounded by RT tags.

AD attribute placeholders in signatures are frequently preceded by a signaling phrase, such as Phone, Fax, Email, etc. If a user does not have the corresponding attributes (or they have an empty value) in Active Directory, and RT tags are not used, the resulting email signature will only contain the signaling word, with no value. To avoid such problems, RT control tags need to be used.

How to use Remove Text tags to remove empty values and signaling phrases

  1. Open your CodeTwo software and edit the signature that requires RT tags.
  2. In the signature editor, insert RT tags in the following way:
    • Find the placeholder and the corresponding signaling word (if there is one) in your signature. Let's assume that it looks like this: Phone: {Phone}
    • Highlight both elements using the left mouse button.
    • Click the Remove Text Tag button on the Editor's ribbon (see Figures 1-3 to learn how the button looks like in different versions of the Editor), and RT tags will be automatically inserted in front of and behind the phrase.

160-3
Fig. 1. The Remove Text Tag button in the current releases of CodeTwo software.

160-1
Fig. 2. The Remove Text Tag button in the previous releases of CodeTwo software (1).

160/02
Fig. 3. The Remove Text Tag button in the previous releases of CodeTwo software (2).

  1. If you want to avoid empty lines after the missing AD content is removed by RT tags, you might need to further modify these tags. See the examples below to learn more.

Example #1 (bad)
This is an example of a signature in which the line containing the phone number is removed if this number is missing for a user in Active Directory:

{First name} {Last name}
{RT}Phone: {Phone}{/RT}
Mobile: {Mobile}

If RT tags are used as shown above, the whole content in between {RT} and {/RT} will be removed if the {Phone} attribute in AD has no value. As a result, an empty line will appear insteadIf you would like to have this empty line removed when RT tags are used, you need to modify the signature by putting the RT closing tag ({/RT}) at the beginning of the next line, as shown in the second example:

Example #2 (good)

{First name} {Last name}
{RT}Phone: {Phone}
{/RT}Mobile: {Mobile}