return to Table of Contents, Messages

Personalizing messages with mail-merge tags

You can personalize your email for each recipient by including mail-merge tags. When your message is sent, Direct Mail will merge your email with data from your mailing list, so that each recipient receives a personalized email just for them. Personalized emails are far more likely to be opened and read, so this can be a powerful technique for boosting engagement.

Here's how to add a mail-merge tag to your email:

  1. Go to the Messages tab.
  2. Select the spot in your message where you would like the mail merge tag to appear.
  3. Click on the "Insert Content" popup menu and choose the mail merge tag you would like to use.

Previewing the result

You can preview what the personalized email will look like when your recipient opens the email:

  1. Go the Addresses tab
  2. Select a recipient
  3. Click the "Preview" button in the toolbar

The Preview window will appear. The message will be personalized for the selected recipient, including any mail-merge tag substitutions. You can use the Back/Forward buttons in the toolbar to step through your mailing list one-by-one.

Example

One common use of mail-merge tags is to include the recipient's first name in the subject or body of the email. If you wanted to include the recipient's first name in the subject line, here's what you would type into the "Subject" field:

A special message for [first name]

If the recipient's name was "Ryan", he would see the following subject in his inbox:

A special message for Ryan

Mail-merge tag definitions

[unsubscribe url]The URL of the unsubscribe web page (Direct Mail manages this web page for you automatically)
[update email address url]The URL of a web page where recipients can update their email address (Direct Mail manages this web page for you automatically)
[web version url]The URL of the web-version of your email (Direct Mail manages this web page for you automatically)
[twitter share url]The URL of a link to share the web-version of your email on Twitter
[facebook share url]The URL of a link to share the web-version of your email on Facebook
[full name]The full name of the recipient. The full name is created by joining the First Name and Last Name. If the recipient does not have values entered for First Name or Last Name, then the value from the Company Name column is used.
[first name]The First Name of the recipient
[last name]The Last Name of the recipient
[company name]The Company Name of the recipient
[email address]The Email of the recipient
[custom 1], [custom 2], etc.The value entered in the Custom 1 (or 2, 3, etc.) column for the recipient
[custom 1 long date], [custom 2 long date], etc.The value entered in the Custom 1 (or 2, 3, etc.) column for the recipient, but formatted as a "long" date. For example, if you entered 2015-1-19 in the Custom 1 column for your recipient, the merge tag would print out something like January 19, 2015.
[custom 1 short date], [custom 2 short date], etc.The value entered in the Custom 1 (or 2, 3, etc.) column for the recipient, but formatted as a "short" date. For example, if you entered 2015-1-19 in the Custom 1 column for your recipient, the merge tag would print out something like 1/19/2015.
[long date]The current date at the moment the message is sent, formatted as a "long" date
[short date]The current date at the moment the message is sent, formatted as a "short" date
[long time]The current time at the moment the message is sent, formatted as a "long" time
[short time]The current time at the moment the message is sent, formatted as a "short" time
[day]The name of the current day at the moment the message is sent.
[date]The current date at the moment the message is sent.
[month]The number of the current month at the moment the message is sent.
[month name]The name of the current month at the moment the message is sent.
[year]The current year at the moment the message is sent.

Using fallback values

You can provide a "fallback" value to use in cases where your mailing list is missing a value. For example, let's say you were sending the following message:

"Hello, [first name]. How are you?"

You may not have first names for all the people in your mailing list. If you did not provide a fallback, then some of your merged messages would end up looking like this:

"Hello, . How are you?"

That doesn't look too good. We can do better by using a "fallback" value. If you provide a fallback, like this:

"Hello, [first name,fallback=Friend]. How are you?"

Then your merged messages that do not have a first name value will come out like this:

"Hello, Friend. How are you?"

That looks much better.

Using mail-merge tags in a URL

Advanced users may want to use mail-merge tags inside of a URL. Perhaps your URL is sending users to a web form and you want to pre-fill the form with mail-merge data (like their name or email address). In order to use mail-merge tags in a URL, prefix the name of the mail-merge tag with "uri:". For example, [uri:first name] or [uri:email address]. This special instruction tells Direct Mail to encode the merged value so that it will work correctly in a URL.

Mail-merge tags in the web-version of your message

Unless you have disabled the feature, Direct Mail automatically creates and hosts a web-version of your message when you send. When creating the web-version, Direct Mail will still process your mail-merge tags, but the "address" they are merged with has no first name, last name, or email address. For example, if your message included the line "Hello, [first name]", then it would be merged to just "Hello, " (no first name). If this is a problem for your message, consider using fallback values, as described above.

About date-based merge tags

When your campaign is sent, date-based mail-merge tags will be processed using the time zone, and locale formatting options specified in your project settings. By default, these settings are the same as what is found in your macOS System Settings (System Preferences) under Language & Region. So, for example, if your current locale is set to Hong Kong when your message is sent, date-based merge tags would be rendered using Chinese formatting, like 2015年1月19日.

Did you find this article helpful? Yes | No