Sun Java System Messaging Server 6.3 Administration Guide

C.3.3.6 Formatting Templates

The formatting templates specified with the FROM_FORMAT, SUBJECT_FORMAT, and all the DSN_* channel options are UTF-8 strings which may contain a combination of literal text and substitution sequences. Assuming the sample email address of

Jane Doe <user@siroe>

The recognized substitution sequences are shown in Table C–17 that follows:

Table C–17 Substitution Sequences

Sequence  

Description  

$a

Replace with the local and domain part of the originator’s email address (for example, “user@siroe”)

$d

Replace with the domain part of the originator’s email address (for example, “domain”)

$p

Replace with the phrase part, if any, of the originator’s email address (for example, “Jane Doe“)

$s

Replace with the content of the Subject: header line

$u

Replace with the local part of the originator’s email address (for example, “user”)

\x

Replace with the literal character “x

For example, the formatting template

From: $a

produces the text string

From: user@siroe

The construct,

${xy:alternate text}

may be used to substitute in the text associated with the sequence x. If that text is the empty string, the text associated with the sequence y is instead used. And, if that text is the empty string, to then substitute in the alternate text. For example, consider the formatting template

From: ${pa:unknown sender}

For the originator email address

John Doe <jdoe@siroe.com>

which has a phrase part, the template produces:

From: John Doe

However, for the address

jdoe@siroe.com

which lacks a phrase, it produces

From: jdoe@siroe.com

And for an empty originator address, it produces

From: unknown sender