MailNinja logoMailNinjaalpha

Features

Macros

A macro is a tag in the text that the program replaces at the moment of sending, not at the moment you look at the preview. The editor shows the token. The person reading the email already sees the date, the name or a line from your list.

The hash sign in the email editor inserts a token. In the macros window a click copies it. The list name inside the token is tied to that list: rename the list and the token changes along with the name.

How to insert a macro

The short path from zero to a result:

Quick start

1
Open the email editorThe subject or the HTML - wherever the token is needed.
2
Press #The macro hint will open under the cursor.
3
Insert the tokenArrows and Enter - {{first_name}} and the others will fall into place.

What the feature does

System tokens of an email:

TokenWhat is substituted
{{date}}Today's date
{{time}}Current time
{{year}}Current year
{{from_name}}The name in the From field
{{from_email}}The address in the From field
{{first_name}}The recipient's first name
{{last_name}}The recipient's last name
{{to_name}}The name in the To field
{{to_email}}The address in the To field
{{to_domain}}The domain from the To address
{{company}}The recipient's company
{{unsubscribe}}The unsubscribe link
{{link}}A tracked, clickable link
{{rand_num:6}}Random digits; the number after the colon is the length
{{rand_letters:4}}Random letters; the number is the length

The name and the company are taken from the address card. An empty field stays empty: a macro does not invent a person.

Your own list is a token of the form {{list:Name}}. The list has at least one item. The next item is taken in order or at random. The separator is a line break or your own short tag. The same list can be inserted into the subject, the text and the preheader.

Spintax in the subject, {First|Second}, is a neighboring mechanism. It is variants of one string, not a macro list and not a filter bypass.

On a public landing page the set is smaller. There you have the date, the time, the year, a random number, random letters and your lists. The email, name and company form fields are an HTML form, not personalization macros. The recipient's name is not on an open page, because anyone can open it.

{{unsubscribe}} and {{link}} count a click when the campaign tracker is enabled and the script on the domain has already been verified. Without the tracker they are plain tags, not statistics.

Where to set it up

  1. Open the email. The hash sign or the Macros button shows the system tokens and your lists.
  2. Insert a token into the subject, the preheader or the plain text. A macro also works in a custom campaign header value.
  3. For your own set, create a macro list: a name, order or randomness, a separator and the items. Copy the resulting token.
  4. Fill in the name and the company in the address card if the {{first_name}}, {{last_name}} and {{company}} tokens are supposed to be non-empty.
  5. On a landing page, open the editor's macros and use only what is allowed on a public page.

What it helps with

One email serves the whole mailing list without turning into a thousand files. The date and the year do not get stuck in last month's text. A random string of a set length distinguishes emails from each other where you need a tag, not a new meaning. A list of cities or job titles is substituted by the rule you defined, and it is visible in the list library.

The full list of macros

MacroWhat it substitutes
{{date}}, {{time}}, {{year}}Date, hours and minutes, year
{{first_name}}, {{last_name}}The contact's first and last name
{{company}}The company from the mailing list
{{to_name}}, {{to_email}}, {{to_domain}}The To, its full address and its domain
{{from_name}}, {{from_email}}The campaign sender
{{unsubscribe}}The tracker's unsubscribe link
{{link}}A click link with tracking and a redirect
{{rand_num:N}}, {{rand_letters:N}}Random digits or letters, from 1 to 32
{{list:Name}}Your substitution list, several passes

Landing pages support the date, the time, the year, the random tokens and your own lists - there are no recipient's personal macros there, the page is shared.

What the feature does not do

A macro does not verify that the name in the mailing list is real. An empty card gives an empty substitution. It does not promise that a personalized line will land in the inbox.

Random letters do not disguise an email. The length after the colon is the length of the string, not a level of "bypass".

On a landing page you cannot expect {{first_name}} the way you do in an email. The page does not know the recipient until the person submits the form. A form submission lands in the address list and is not recorded as a campaign conversion.

How to tell the tokens are live

The editor preview still shows the {{ }} braces or a list of subjects, not yesterday's date already frozen into the HTML. A test email to your own address shows the substitution: today's date, the name from that address card, the list item from the defined order. If the test has an empty name, it is an empty card, not a broken token.

Insert macros into an email ↗

Frequent questions

Macros in short: when they are substituted and what is not available on a page.

When does a macro become text?

At the moment of sending. The token stays in the editor. The test email shows the already substituted value.

Where do the name and company come from?

From the address card. A macro does not fill in an empty field by itself.

How do I set the length of a random string?

With a number after the colon: {{rand_num:6}} or {{rand_letters:4}}. It is the length, not a way to pass a filter.

How is a macro list different from spintax?

A list is the {{list:Name}} token with items, order or randomness. Spintax is variants within one subject line separated by a vertical bar. Neither changes the meaning of the email into a filter bypass.

Which macros work on a landing page?

Date, time, year, a random number, random letters and your lists. Form fields are the form, not personalization. The recipient's name is not on an open page.

Does the unsubscribe link count without the tracker?

No. {{unsubscribe}} and {{link}} get into the statistics when the campaign tracker is enabled and the domain has already been verified.

What happens if I rename the list?

The token changes along with the name. The old tag in the text needs to be replaced with the new one.