Variables let you insert dynamic values into fields such as header names, header values, directory paths, and other supported inputs, as well as into Templates.
User attributes
User attribute variables insert data of the message sender. The sender's email address is
looked up in the data imported from the Directory service,
and the matching user's attributes are used. You can preview the imported values on the
User attributes page.
These variables are available in Templates applied by signature and
disclaimer rules. A variable is replaced with an empty string when the sender is not found in the
directory or the attribute has no value.
| Variable | Description |
|---|
{id} | User identifier |
{mail} | Email address |
{firstName} | First name |
{lastName} | Last name |
{displayName} | Display name |
{notes} | Notes |
{phoneNumber} | Phone number |
{mobileNumber} | Mobile number |
{streetAddress} | Street address |
{city} | City |
{postalCode} | Postal code |
{country} | Country |
{jobTitle} | Job title |
{department} | Department |
{company} | Company |
{employeeId} | Employee identifier |
Photo
The photo variables insert the user's photo with the image data embedded directly in the message,
so no external hosting is needed. The image format (JPEG, PNG, or GIF) is detected automatically.
Photo variables produce output only in the HTML version of a template; in the plain-text version
they are replaced with an empty string.
| Variable | Description |
|---|
{photo} | Ready-to-use HTML <img> tag with the embedded photo in its original size |
{photo:WIDTH} | Same as {photo} with a fixed width in pixels, for example {photo:100} |
{photo:WIDTHxHEIGHT} | Fixed width and height, for example {photo:100x60} |
{photo:xHEIGHT} | Fixed height, for example {photo:x60} |
{photoData} | Bare image data (data URI) without any markup, so you can write your own tag around it, for example <img src="{photoData}" alt="Photo" /> |
Dimensions are given in pixels and can range from 1 to 2000; a value outside this range is ignored
and the original size is kept.
Message
Misc
| Variable | Description |
|---|
{message:id} | Unique message identifier; value of the X-MSH-Id header added by the application |
{message:subject} | Message subject |
Size
| Variable | Description |
|---|
{message:size} | Message size in kilobytes (default unit) |
{message:size:b} | Message size in bytes |
{message:size:kb} | Message size in kilobytes |
{message:size:mb} | Message size in megabytes |
{message:size:gb} | Message size in gigabytes |
| Variable | Description |
|---|
{message:headers:count} | Total number of message headers |
{message:header:HEADER_NAME} | Value of a specific header; replace HEADER_NAME with the actual header name |
Attachments
| Variable | Description |
|---|
{message:attachments:count} | Number of attachments |
{message:attachments:size} | Total attachment size in kilobytes (default unit) |
{message:attachments:size:b} | Total attachment size in bytes |
{message:attachments:size:kb} | Total attachment size in kilobytes |
{message:attachments:size:mb} | Total attachment size in megabytes |
{message:attachments:size:gb} | Total attachment size in gigabytes |
{message:attachments:filenames} | Comma-separated list of attachment filenames |
{message:attachments:filenames_perline:PREFIX} | Attachment filenames on separate lines, each prefixed with PREFIX |
Misc
| Variable | Description |
|---|
{misc:guid} | Randomly generated GUID in the format 00000000-0000-0000-0000-000000000000 |
{misc:random:MIN-MAX} | Random integer between MIN and MAX (inclusive) |
{misc:random:value1,value2,value3} | Random value selected from a comma-separated list |
{misc:date:FORMAT} | Current date and time formatted using Java date pattern characters (y, M, d, H, m, s, etc.) |