5.2. Use Advanced Variables

5.2.1. Message Variables

5.2.1.1. Message Misc

${message:id} Message unique identifier, value of X-MSH-Id header added by MSH Traffic Policy.
${message:subject} Message subject, shortcut for ${message:header:subject}.

5.2.1.2. Message Envelope

${message:envelope:sender} Message envelope sender.
${message:envelope:recipients} Message envelope recipients. If more than one then separated with comma.
${message:envelope:recipients:count} Message envelope recipients count.

5.2.1.3. Message Size

${message:size} Message size in default size unit (kB).
${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.

5.2.1.4. Message Headers

${message:headers:count} Message headers count.
${message:header:HEADER_NAME} Message header, where HEADER_NAME should be replaced by any message header name.

5.2.1.5. Message Attachments

${message:attachments:count} Message attachments count.
${message:attachments:size} Message total attachments size in default size unit (kB).
${message:attachments:size:b} Message total attachments size in bytes.
${message:attachments:size:kb} Message total attachments size in kilobytes.
${message:attachments:size:mb} Message total attachments size in megabytes.
${message:attachments:size:gb} Message total attachments size in gigabytes.
${message:attachments:filenames} Message attachments filenames separated by comma.
${message:attachments:filenames_perline:PREFIX} Message attachments filenames separated by new line in plain text or <br> in HTML [1]

[1] PREFIX is a text which will be placed in front of each attachment file name (it could be an advanced variable).

5.2.2. Misc

${misc:guid} Random globally unique identifier in format 00000000-0000-0000-0000-000000000000
${misc:random:13-255} Random value between Min-Max.
${misc:random:red,blue,green,tomato} Random value, where values are separated by comma.
${misc:date:dd/mm/yyyy} Current date time stamp in specified format [2]

[2] Current date time stamp in specified format.

Letter Date or Time Examples
G Era designator AD
y Year 1996; 96
M Month in year July; Jul; 07
w Week in year 27
W Week in month 2
D Day in year 189
d Day in month 10
F Day of week in month 2
E Day in week Tuesday; Tue
a Am/pm marker PM
H Hour in day (0-23) 0
k Hour in day (1-24) 24
K Hour in am/pm (0-11) 0
h Hour in am/pm (1-12) 12
m Minute in hour 30
s Second in minute 55
S Millisecond 978
z Time zone Pacific Standard Time; PST; GMT-08:00
Z Time zone -0800