Table of Contents


Creating Templates


· Templates   (top)

Using the template tag feature enables you to individualize each recipients message. You can use the template mechanism (optionally) along with AppleScript to programmatically customize the message further. (Resources for learning the basic and advanced features of AppleScript, including many example scripts, can be found in many places, particularly on the Internet.)

You can embed AppleScript and other template tags into your HTML or text files. Mailings evaluates them and replaces the tags by their value.

You can include template tags in the preamble and the "plain text alternative". You can also include them in the subject and attachment path. So, for example, using the preamble with template tags enables you to personalize the mailing.

A template tag is of the form {tagName}, where "tagName" is either one of the predefined names below, or a pathname pointing to an AppleScript text file. In the latter case the script is loaded and run and its result replaces the tag.

AppleScripts as well may contain the following named tags. But when you do this you don't write it as {tagName}, but rather as "__tagName", leaving out the curly brackets and prefixing with double underscore. This way tag values can be used in AppleScript lists.

· Predefined Template Tags   (top)

The basic predefined template tags currently supported are named as follows. Some of the tags are provided for use in AppleScripts, since template replacement is how you can get information into a script.

(Note: the Address Book tags can be tested in when you are previewing, and in that case the tag values correspond to the "Me" card in Address Book.)




For example, to embed the "LongDate" you include a tag like this in your file:

Here is the LongDate: {LongDate}

which will be evaluated to something like this:

Here is the LongDate: Saturday, December 4, 2004

The message editors provide popup menus that facilitate inserting these tags, so you don't need to memorize them! For example this is how you can insert the first name tag, just make the corresponding selection from the mail tag popup:

· Special Template Tags for Address Book data  (top)

Mailings supports special template tags for accessing the values of Address Book custom labels for email addresses, phone numbers, dates and related names.

For more information read "Using Custom Address Book Labels"

· Special Template Tags for Import File data   (top)

Mailings supports special template tags for accessing the values of import file fields for each recipient.

For more information read "Using Custom Import Template Tags"

· AppleScript Tags  (top)

You can embed AppleScripts directly into your documents, preamble or the plain text alternative using two different methods:

To create a tag whose value is the result of an AppleScript just create a tag whose name is the path to the ApplesScript file. For example, if you had an AppleScript in your Documents folder named "Current date.applescript", then the tag would be something like this:

{/Users/joe/Documents/Current date.applescript}

Note that you can use the "Insert AppleScript" button in each message editor to insert the path to the AppleScript for you!

AppleScripts as well may contain the predefined named tags. And that is how you can pass values into the script, such as the current recipients name.

But when you do this you don't write the tag name as {tagName}, but rather as __tagName, leaving out the curly brackets and prefixing with double underscore, so tag values can be used in AppleScript lists. The tag, when replaced by Mailings, will automatically be quoted, as strings need to be in an AppleScript.



Copyright © 2013 Limit Point Software