return to Table of Contents, Creating and Editing 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 the recipient (like their first name), 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. Choose the mail merge tag you would like to use from the drop down list.

Previewing the Merged Result

If you want to preview what your recipient will see when he or she opens the email, use the Preview window by clicking the Preview icon in the toolbar.

While keeping the Preview window open, switch to the Addresses tab and select an address from your mailing list. As you select different addresses, you'll see that the Preview window updates to show you how your mail-merge tag will appear for each recipient.

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" text 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-hosted 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-hosted version of your email on Twitter
[facebook share url]The URL of a link to share the web-hosted 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. [Adding custom data to recipients](/support/article/222).
[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 date. For example, if you entered 2015-1-19 in the Custom 1 column for your recipient, the merge tag would print out 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 date. For example, if you entered 2015-1-19 in the Custom 1 column for your recipient, the merge tag would print out 1/19/2015.
[long date]The current date at the moment the message is sent. Formatted as January 19, 2015.
[short date]The current date at the moment the message is sent. Formatted as 1/19/2015.
[long time]The current time at the moment the message is sent. Formatted as 10:16:12 PM PDT.
[short time]The current time at the moment the message is sent. Formatted as 10:16 PM.
[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 may have recipients that are missing mail-merge values. In this case, you can provide a "fallback" value to use. 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 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