Mail Merge Short Tags

 

The mail merge shortcut tags either pull data from your members database table, or perform procedures to provide the needed information. If you have additional columns in your members database table, you can merge their value in using this simple %%fieldname%% syntax. Note that if you have List Scripting/Merge Capabilities set to No Advanced Scripting, or if you're not running ListManager Pro or Enterprise, only the default ListManager short tags are available.

 

The easiest way to personalize your message is to use the Insert Field wizard when creating content. This section discusses how to manually insert these tags if you don't want to use the wizards, or if you'd like to do more advanced personalization and scripting.

 

Commonly Used Short Tags

%%emailaddr%%

The recipient's email address. Note that this tag works correctly even if the email address field in the database has a different name. This tag is equivalent to %%merge members_.EmailAddr_%%

 

%%email.owner%%

The email address for sending messages to the owner(s) of this mailing list. This is the owner-listname@… address and all mail sent to this address is distributed to the members of the list who have the setting "receive admin mail: yes" set.

 

%%email.unsub%%

The merge tag %%email.unsub%% will be inserted into your content, and will be converted into a unique unsubscribe mail merge tag for each recipient. Example:

 

leave-141-4323.b5b1d9ada94bb80609d21eecf7a2ce7a@example.com

 

Only member 4323 will see this address. When email comes into ListManager with this address, it will unsubscribe that member, and record which mailing prompted the member to unsubscribe. The string "b5b1d9ada94bb80609d21eecf7a2ce7a" dot-appended to the address is a checksum, ensuring that malicious people cannot unsubscribe others. For example, if someone changes the number to something else, say "4000," by mailing to "leave-141-4000.b5b1d9ada94bb80609d21eecf7a2ce7a@example.com," ListManager will see that this number has been tampered with, because "b5b1d9ada94bb80609d21eecf7a2ce7a" is not the correct checksum for the string "leave-141-4323". In this case, ListManager will interpret the message as if it were sent to "leave-jazztalk@example.com" and unsubscribe the sender of the message.

 

%%email.purge%%

The email address for unsubscribing from all mailing lists at this server.

 

%%expiredate_%%

The date (if any) that this recipient's subscription expires.This tag is equivalent to %%merge

members_.ExpireDate_%%

 

%%firstname%%

The recipient's first name (the first part of their full name). If the member does not have a full name, their email address is used instead. If a member only has a single component to their name, that part is used.

 

Note You can supply an alternate name which will be inserted in the message if there is no first name for the recipient. To do so, insert a space after the "firstname" text, and then type the alternate name. For example:

 

Dear %%firstname Member%%,

 

In this case, if the recipient does not have a first name, his email will read:

 

Dear Member,

 

 

%%fullname%%

The recipient's full name. If the member does not have a full name, their email address is used instead. For example, you might start your mailing out with this:

 

Dear %%fullname%%, we are glad that you have…

 

And ListManager would substitute it to say:

 

Dear Bob Smith, we are glad that you have…

 

%%fullname_%%

Similar to %%fullname%%, except if there is no name, a blank is inserted. This tag is equivalent to %%merge members_.FullName_%%

 

%%nameemail%%

The full name and email address of the recipient.

 

For example, you might want each posting to your list to be addressed to the individual recipient:
To: %%nameemail%%

 

If a full name is not available, ListManager will only put the email address.

 

For example:
Bob Smith <bob@example.com>

 

Or if no name is available:

 

bob@example.com

 

%%url.mailing%%

Merges in a link that, when clicked, displays the mailing with all fields merged for the recipient in the recipient's web browser. Recipients may click this URL to view the message correctly if it is not viewable in the email client. This code requires that archiving be enabled for your list.

 

%%url.resetpassword%%

Sends the recipient a link that, when clicked, allows the admin password to be replaced. The URL is valid for one hour after it is sent.

 

%%url.resetpassword_mri%%

Sends the recipient a link that, when clicked, allows the password to the discussion forum interface to be replaced. The URL is valid for one hour after it is sent.

 

%%whatlists%%

This substitutes in a listing of all the lists on the server the recipient is a member of. This tag is very useful when you want to let users know exactly which lists they have signed up for. It is important to note that this tag only shows those lists where the member's status is "normal". In other words, if a list the member has subscribed to is set to require confirmation, and the member has not confirmed, the list will not show up in this listing. An excellent opportunity to use this tag is when a member signs up for many lists at once and they are sent a single hello document. That way, rather than receiving a welcome message for each list, they receive a single welcome with a listing of the lists they've joined.

 

Note that this tag should not be used in the Subject: line of a message or document, as it will force some of the email headers into the body of the message.

 

%%whatlistsunconfirmed%%

This substitutes a listing of all the lists the recipient has subscribed to, but has not yet confirmed. This tag is particularly useful when adding a member to many lists and you want to send them a single confirmation that shows the lists they have not yet confirmed. A good opportunity to use this tag is when you have subscribed someone to many lists at once using the 'Add' command in a command email message. In that command message, you also specified that the member should receive a single confirmation message by using the oneconfirm modifier. See Adding to Many Lists for more information.

 

Note that this tag should not be used in the Subject: line of a message or document, as it will force some of the email headers into the body of the message.

 

Other Short Tags

These tags are also available, though less commonly used. You may also create tags from any of the members_ fields. A list of the default ListManager member table fields may be found in the members_section of the Programmer's guide.

 

%%author.nameemail%%

The full name and email address of the message sender, e.g.: Bob Smith <bob@example.com>. Or, if no name is available, only the email address is merged in: bob@example.com.

 

%%brand.commandaddress%%

Changes the email address that a message is sent from to appear to be "listmanager@yourservername.com". For example, "ABC@example.com" would appear as "listmanager@example.com". This is useful for sending commands directly to ListManager or to other list administrators.

 

%%ConfirmDat_%%

The date (if any) when this recipient confirmed their membership. Only applies to lists where "confirm membership: yes" is set. This tag is equivalent to %%merge members_.ConfirmDat_%%

 

%%DateJoined_%%

The date when this recipient joined the list. This tag is equivalent to %%merge members_.DateJoined_%%

 

%%email.list%%

The email address to use when writing to this list.

 

%%email.listsegment%%

The email address to use when writing to this list/segment.

 

%%inmail.bodyquoted%%

The full body of the incoming mail message (does not include the header), with each line quoted with a "> " character.

 

%%list.name%%

The short name of the list.

 

%%list.segment%%

The list and segment name. E.g., "listname.administrators".

 

%%memberid%%

The recipient's member ID. Note that this tag works correctly even if the member ID field in the database has a different name.This tag is equivalent to %%mergemembers_.MemberID_%%

 

%%memberidchar%%

The recipient's member ID along with a special checksum character. This is used in many places for creating "failsafe" confirm, unsubscribe, and purge addresses and is also used by some special web-based scripts.

 

%%outmail.messageid%%

The message ID of this message in the outmail queue.

 

%%poundemail%%

The recipient's email address with a "#" sign substituted for the "@" symbol. This tag is used in message headers for identification purposes and is not really useful for anything else.

 

%%recip.hdrto%%

Returns the current recipient's email address and full name in the standard header format of:

"Full Name" <emailaddress@example.com>

or, if the full name field is empty, just the email address will be returned. This merge tag is generally used on the To: field of a message.

 

%%recip.smtpmessageid%%

Returns a unique ID for this mailing and recipient for use in the Message-ID header field. Since this is added automatically by ListManager, you will generally not ever need this tag.

 

%%list.hdrfrom%%

Returns the name of the list and the list email address:

"Listname"<listname@example.com>.

 

%%listmanager.hdrfrom%%

Returns the string:

"Lyris ListManager" <listmanager@example.com>

The product name and command address depend on the server's rebrandable settings and the domain of the site that the current mailing is being sent to.

 

%%listmanager.hdrfromadmin%%

This tag is obsolete, instead use %%listmanager.hdrfromnoreply%%, described here:

 

%%listmanager.hdrfromnoreply%%

Returns the string:

"Lyris ListManager" <lyris-admin@example.com>

The product name and command address depend on the server's rebrandable settings and the domain of the site that the current mailing is being sent to.

 

%%listmanager.mailfrom%%

This tag is obsolete, instead use %%brand.commandaddress%% instead, described here:

 

%%listsegment.hdrfrom%%

Returns the name of the list and the segment email address:

"Listname"<listname.segment@example.com>.

 

%%brand.commandaddress%%

Returns the command address for the server. For example: "listmanager@example.com".

 

%%brand.name%%

Returns the current brand name. For non-rebrandable servers, this will always be "Lyris ListManager".

 

%%brand.emailname%%

Returns the name part of the ListManager command address. For non-rebrandable servers, this will always be "lyris".

 

%%brand.emailnamelc%%

Returns the lower case name part of the ListManager command address. For non-rebrandable servers, this will always be "lyris".

 

%%brand.commandaddress%%

Returns the full command address including the domain.

 

%%segment.name%%

Returns the name of the segment sent to. For example, "administrators".

 

%%site.domainname%%

Returns the domain name associated with the site that the outmail record is associated with. If there is no site, this will default to the alphabetically sorted first domain in the sites_ table.

 

%%outmail.messageid%%

Returns the message ID of the current outmail record.

 

%%author.nameemail%%

Returns the name and email address of the sender of the current mailing in the form:

Full Name <email@example.com>

Note that this information is not available for mailings sent via the web interface.

 

%%email.join%%

Returns the email address for joining the current list.

 

%%email.confirm%%

Returns the email address for confirming a subscription to the current list.

 

%%email.bounce%%

Returns the bounce address for the current recipient.

 

In some cases, these tags provide substitute data if the originally requested data is blank, much like a conditional content command. For example, if there is no name, %%firstname%% will merge in the email address. For more information, see Using Mail Merge Tags.

 

If you are using your own members table instead of the default ListManager members_ table, you'll need to use the field names in your members table. See Using Mail Merge Tags for more information.

 

If the name is blank, I'd like to merge in something else

Tags like %%fullname%% will merge in the member's email address if there is no name. If you'd like to merge in something else, you may use a script like this:

%%!
set fullname [merge members_.fullname_]
if {$fullname == "} {
 return "no name"
} else {
 return $fullname
}%%

 

Scripting Information

If you are using mail merge tags in your own scripts, use the full %%merge members_.fieldname%% syntax for members table field names. The short tags above which are not member table fieldnames may be used in scripts.