Knowledge Base

How to include vCards as QR codes in email signatures

Problem:

You would like to insert a vCard as a QR code in an email signature added by CodeTwo software. You want to have this QR code personalized so that every user has their individual vCard added to their signature.

Solution:

The vCard standard is a popular and easy way to share contact information. In most PC operating systems, double-clicking the vCard (.vcf) file adds a new entry to the address book of the default email program (e.g. Outlook).

VCF files are plain text files with appropriate fields inside. That is why vCards can be converted into QR (Quick Response) codes. QR codes can be very useful, for example to quickly share contact information with mobile devices: by scanning a vCard converted into a QR code with your phone's camera, you can automatically add a new contact to your address book (Fig. 1.).

256-1
Fig. 1. Cameras in mobile devices such as iPhones can read vCard info from QR codes.

How to insert QR codes (containing vCard info) into email signatures

CodeTwo signature-adding programs allow you to generate a QR code image from text input and add it to email signatures. You can also include Active Directory attributes of your users in the generated QR codes so that the QR code changes depending on the message sender.

To generate a QR code image based on a text value, you need to:

  1. Open your signature template in the CodeTwo software that you use.
  2. Select a place in your signature where you would like to add a QR code, click the Placeholder or AD attributes button (depending on your software) on the signature template editor's ribbon, and go to Other > QR Code image (Fig. 2.).

Older versions of CodeTwo programs

If you use an older version of CodeTwo software, you can insert QR codes by clicking the Dynamic Field button and choosing GeneralQR Code Image.

256-2 Editor - QR Code image
Fig. 2. Adding a QR code image in CodeTwo Editor.

  1. The QR Code image configuration window opens (Fig. 3.). Here, you can provide a text value that will be converted into a QR Code image. You can also specify the size of the image, see a live preview of the image, and insert AD placeholders. Keep in mind that the QR Code image size will automatically change if you exceed the character limit specified for each size. The upper limit is 1476 characters and if you exceed it, your text will be trimmed.

256-3 QR Code image window
Fig. 3. The QR Code image configuration window.

  1. If you want to create a QR code image that includes a vCard, you need to open your vCard (.vcf) file in any text editor, copy the file content (text), and paste it in the QR Code image configuration window, as shown in Fig. 3.
  2. If you want to create a QR code that displays personalized data (that changes dynamically based on the sender), you need to replace text elements that refer to AD attributes with appropriate placeholders. See the example below.

Example: Let's suppose that your vCard is in version 3.0 and in the source (text) code it looks as below.

BEGIN:VCARD
VERSION:3.0
N:Luck;Simon
FN:Simon Luck
TITLE:Marketing Manager
ORG:My-Company
URL:https://my-company.url/
EMAIL;TYPE=INTERNET:[email protected]
TEL;TYPE=voice,work,pref:+ 1 888 725 33 64
TEL;TYPE=voice,cell,pref:+1 1234567890
ADR:;;1st Street, New York, 10001 NY
END:VCARD

If you want the QR code to change depending on the sender, you need to replace some parts of the text with appropriate placeholders, by using the Placeholder / AD attributes drop-down menu in your CodeTwo software. For example, replace Simon with the First name field, Luck with Last name, and so on. Each field (e.g. an address) needs to be in an individual text line - do not use any line breaks.The result should look like the code below:

BEGIN:VCARD
VERSION:3.0
N:{Last name};{First name}
FN:{First name} {Last name}
TITLE:{Title}
ORG:{Company}
URL:https://my-company.url/
EMAIL;TYPE=INTERNET:{E-mail}
TEL;TYPE=voice,work,pref:{Phone}
TEL;TYPE=voice,cell,pref:{Mobile}
ADR:;;{Street}, {City}, {Postal Code} {State}
END:VCARD
  1. The last step is to save the signature template and then save the program's settings.

That's all - now when someone sends a message that meets the rule's conditions, a signature with a vCard encoded as a QR image is inserted into the message, and the vCard's content depends on who is the sender.

The VCF code offers much more fields to be defined - the full list is available here.

Tip

You can use our free application - CodeTwo QR Code Desktop Reader & Generator - to read and generate QR Codes.

Was this information useful?