AD attribute placeholders: examples of use

Active Directory attributes can enhance your emails in many ways. For example, you can use Active Directory attributes to add personalized (user-specific) content to email signatures, or to create content that randomly changes with each sent email (such as marketing banners). Click the links below to learn about common usage scenarios.

How to add personalized images to email signatures

You can use AD attribute placeholders to enhance your email signatures with graphics (user photos, images, logos, etc.) that are added dynamically, depending on the person who sends a message. See guidelines for:

Hosted images

If you want users to have personalized graphics (images, logos, etc.) in their email signatures, CodeTwo software can do that for you. You only need to create a web storage location with images of all/some of your users. Our software can then insert these image files dynamically into emails sent by individual users. That way, a different graphics can be used for each user. To achieve this, you need to:

  1. Prepare individual graphics files for all/selected users and give these files names based on an AD attribute or attributes of your users. For example, you can use attributes such as First name and Last name in filenames (examples: John.Smith.png, Donna.Bell.png). Make sure to use the same filename pattern for all images. Remember that image filenames are case sensitive, and the letter case should be the same as the AD attribute value. You can use any image format, but it has to be the same for all pictures.
  2. Upload these graphics files to a web server and make sure that there are no viewing restrictions. 
  3. In the Editor, you need to define personalized images by using AD attribute placeholders in the image source paths. Follow the steps below:
    1. Open the signature to which you would like to add personalized graphics.
    2. Select a place where the image should appear, and click the Picture button on the toolbar. Learn more
    3. Choose Online picture and provide the URL of any of the previously uploaded graphics files (see Fig. 1.). Define the picture size, if necessary. Click OK.

Editor - insert picture - online
Fig. 1. Choosing an online picture directory.

  1. Click the </> Source button on the Editor's toolbar to open the HTML source code view of the signature.
  2. Find the HTML element that inserts your image:

    <IMG border=0 src="http://my-image-source.domain/pics/John.Smith.png">

    and modify the image source address by replacing the filename with placeholders. For example, if your image file is Name.Surname.png (as in the sample code above), change it to {First name}.{Last name}.png. You can use the AD attributes button to insert placeholders.  

  3. Click Save in the source code view, then save the signature in the Editor.
  4. Click the Preview button on the Editor's toolbar and choose any AD user to check the results.

Tip

If you know HTML, you can insert images with placeholders instead of filenames directly in the source code view.

User pictures from the Photo attribute in Active Directory

With CodeTwo software, you can pull your users' photos from Active Directory, and insert these images into email signatures. In this way, each person can have their own profile photo added to messages. Use the links below to learn how to use the {Photo} attribute placeholder in:

Was this information useful?