Crestron
e-control Mail SW-MAIL
49
••
Control Messages
Installation & Reference Guide — Doc. 5798
An e-mailer signal block is
enabled by assertion of its
Enable
signal from the control system.
All registers are undefined when the e-Mailer signal block is enabled. A register is
defined by receipt of a
SetParm
and
LookupParm
signal. Register definitions are
"sticky" — which means that they persist and can be referenced in successive e-Mail
messages. The registers remain defined until the server protocol is halted.
If a directive references an undefined register, or the number in the directive is out of
range (less than 1 or greater than
n
), the string "..." is inserted into the text in place of
the erroneous invocation.
If, however, the
Lookup substitution defaults
check-box is checked under the
tab, an undefined or out of range directive is replaced by a value from the
eMail_Subst
table. This would be the value in the substitution field of the record
with an ID value equal to the bogus register number (for more information on the
eMail_Subst
table, see “The
eMail_Subst
Table” on page 44). If there is no
such record, or if its substitution field is null, the string "..." is inserted into the text
in place of the erroneous invocation. (You might want to arrange your eMail_Subst
table such that the first n entries are true defaults for the undefined in-range
directives; and all remaining entries can be thought of as defining the out-of-range
directives.)
Be aware that because text substitution does not take place until the mail is actually
sent (upon receipt of the SendNow signal, or a Shortcut signal), the registers invoked
by the text only need to be defined prior to that time — which could be subsequent to
specifying the subject and/or body text.
Text File Inclusion
A future release will permit an
alternate folder to be named in the
e-Mailer signal block Definition
window, a pathname either
relative to the application folder,
or absolute (fully qualified).
The text substitution routine scans for file inclusion directives, represented by a
constructs with the following syntax:
~[abc]
where
abc.TXT
is used as the
name of a file in the application folder. This file is opened and its entire contents is
inserted into the text in place of the construct. If the file cannot be opened or read
from, the string "..." is inserted instead.
Rescanning
Inasmuch as such text substitution operations can obviously create new substitution
directives, the entire text is now rescanned.
The above schemes allow for tremendous flexibility. For example:
•
Substitution parameters and text files can contain further substitution
directives.
•
Text filenames can reside in the original text, or the text can contain
parameter substitution directives and the substitution strings can contain file
names.
•
Two adjacent substitutions can resolve to the left and right halves of a new
substitution directive.
Control Messages
Control messages are e-mail messages with embedded signals. When the server
reads one of these messages, it interprets the text and sends the embedded signals
immediately. It then deletes the message from the server. Such messages are never
placed in the IN box (if there is one).