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 email address for unsubscribing from the current mailing list. This tag creates for each member a unique unsubscribe email address, containing the MemberID_ and a "check character." Example:
leave-jazztalk-4323P@lyris.net
Only member 4323 will see this address. When email comes into ListManager with this address, it will unsubscribe that member. The final "P" on the address is a "check character". This means that if someone malicious changes the number to something else, say "4000", by mailing to "leave-jazztalk-4000P@lyris.net", that ListManager will see that this number has been tampered with, because "P" is not the correct "check character" for the number "4000". In this case, ListManager will interpret the message is if it were sent to "leave-jazztalk@lyris.net" 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.
%%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
%%Password_%%
The recipient's password. This tag is useful if you have ListManager assign a random password to a user. By including this tag in a Hello document, the user knows what that password is. This tag is equivalent to %%merge members_.Password_%%.
%%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 "lyris@yourservername.com". For example, "ABC@example.com" would appear as "lyris@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.
%%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.
%%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 %%merge members_.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.
%%passwordnotifystring%%
Returns the string:
"Note: the password "(password)" has been assigned to you", if the list is set to require a password, and the password field is not empty. This is generally only useful for Hello documents for lists that may generate random passwords for subscribers.
%%listmanager.hdrfrom%%
Returns the string:
"Lyris ListManager" <lyris@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:
%%brand.commandaddress%%
Returns the command address for the server. For example: "lyris@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.
%%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.
Note that ListManager 5.x will also continue to support the old $subst tags, and that these tags will work even if List Scripting/Merge Capabilities is turned off.
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.
More
2. Mail Merge Short Tags
4. Fetching Data from a Web Server
5. Troubleshooting Merge Tag Problems