Message templates to reuse in the composer. Andre Klapper ak-47@gmx.net Novell, Inc

Creative Commons Share Alike 3.0

Message Templates

A message template is a standard message that you can use at any time to send mail with the same pattern.

To enable the Message Template Plugin, click EditPlugins and enable Templates.

Saving an Existing Message as a Template

Select the message.

Right-click the message and choose Move to folder or Copy to folder.

Select the Templates folder under On This Computer.

You can also edit an existing message and save it as a template:

Open the message and click Reply.

Edit the message body or the addresses according to your requirements.

Select FileSave as Template.

Saving a New Message as a Template

Click New and enter in the composer window what you need for the template.

Select FileSave as Template.

Using a Template as a Reply

Right-click the message you are replying to, then click Templates.

This option lists all the message templates in the Templates folder.

Select the message template of your choice. Make changes if required in the email composer window that will open.

Click Send.

When you select a message template for replying, the subject of the reply is preserved.

Configuring Variables for Message Templates

Select EditPlugins.

Click Templates.

Click the Configuration tab.

You can add, edit or remove the key-value pairs. You can specify any number of key-value pairs.

In any template, the occurrence of every $key is replaced by the value it has in the configuration. For example, if you set the key to Manager and the value to Harry, any occurrence of $Manager is replaced by Harry in the message.

Assume that you have 1000 message templates with your current manager's name in them. When the current manager is replaced by a new one, it is not easy for you to manually replace the manager's name in all the 1000 messages. If the messages have a $Manager key value, you can reset the value in the Configuration tab of this plugin.

By default, the entire environment variables are used as a key-value pair. An occurrence of $env_variable is replaced by the value it carries. For example, an occurrence of $PATH in your template is replaced by its value when the template is used.

The replacement process uses the following order of precedence:

$key is replaced by the value set for it in the Configuration tab of the Templates plugin.

If the key is not found, it is then replaced with the value of its environment variable.

If key is neither a configuration option nor an environment variable, no changes are made.

Using Elements From a Message in a Template When Replying

Templates can contain more than just the predefined set of key-value pairs. You can also get any message header values from the email that you are applying the template on, plus the complete message body.

In order to do this, use the format $ORIG[header_name] and replace the variable header_name by the actual header. For example, if you would like to insert the subject line of the message that you reply to, use $ORIG[subject]. To insert the complete body, use $ORIG[body].

If no replacement for a variable is found, the variable is not removed (except for $ORIG[body]) but left in place so that you see that something went wrong. This could happen when trying to use headers that are not necessarily always available in the original message (for example $ORIG[reply-to]).