Knowledge Base

How to create a social media button

This article is obsolete and may relate only to older versions of our software.

If you are using a version of CodeTwo Exchange Rules that is not listed in the Related products section (below this article), see this article instead.


How to insert a social media button into your signature.


CodeTwo Exchange Rules family programs do not have yet a built in feature of inserting clickable buttons for social media websites that would be individual for each user. However, there is a workaround available that takes advantage of the Rotating Text feature to create such a dynamic content.

To fully understand the whole context of using the Rotating Text feature please spare a minute to familiarize yourself with the below articles:

If you already have got an idea of using Rotating Text for the purpose of creating buttons in your signature with individual hyperlinks assigned, you can proceed with the instruction below.

We strongly recommend to download the example below and to modify it to suit your needs. Please back up your current set of rules prior to importing our examples. You can use the import/export button in the main menu of the program to do this. 

We need to "build" an HTML hyperlink under the image from parts of the code located in external source - files on the hard drive and from Dynamic fields (as Dynamic fields work only when inserted directly in the editor). Let's say we want to create a button that would lead us to an individual user account on Facebook. Let's assume that each user has his/her unique Facebook ID in Active Directory Web page attribute. So if the user's full Facebook address is then in the AD Web page field this user should have just the CodeTwo part of the link.

Fig. 1. The AD field which contains the ID which is a part of the hyperlink.

Let us use an image stored in this location C:\button\f.png. The full line in the source code of the signature should look like this:

<A href="{Web page}"><IMG border=0 hspace=0 src="C:\button\f.png"></A>

However, the code inserted this way would not work, we need to use Rotating Text. This feature will break this line into dynamic pieces, so the signature in the editor looks like on Fig. 2.

  • {Rotating text} - points at C:\button\1\1.htm which contains code <A href="
  • {Web page} - pulls the AD Web page attribute
  • {Rotating text} - points at C:\button\2\1.htm which contains code ">
  • the picture - inserts an image C:\button\f.png (<IMG border=0 hspace=0 src="C:\button\f.png">)
  • {Rotating text} - points at C:\button\3\1.htm which contains code </A>

Fig. 2. The signature's appearance in the template editor.

Always remember when using this method:

  • {Rotating text} and {Web page} placeholders must be inserted using top menu buttons. If you type in the placeholders, they will not work.
  • Upon inserting the placeholders please make sure that {Rotating text} fields are linked to appropriate folders on the hard drive. If the software is installed on multiple Exchange servers, you need to create these folders in the same location (path) on each Exchange server.
  • A system account - Network Service has appropriate rights to the folder where you store an image used by a button and the folder with rotating text files. See this article for details.

If everything was done properly the result should be as presented in Fig. 3 and 4 - a signature with a clickable social media button that would point to individual user's profile.

Fig. 3. The signature's appearance in the email.


Fig. 4. 
The f button is clickable and redirects to the user's Facebook profile.

Was this information useful?