Crestron
e-control Mail SW-MAIL
98
••
Appendices
Installation & Reference Guide — Doc. 5798
SetRcptAddr
Applies to
e-Mailer signal blocks
Description
Sets the recipient’s e-mail address.
Direction
system-to-server
Type
Serial (string)
Value
New recipient address
Expected Reply
None
Comments
This signal is not required to send e-mail. This signal is one of several methods of
setting the recipient address.
If the
Allow multiple recipients
option is checked in the e-Mailer signal block
definition,
SetAddr
(or
LookupRcpt
) may be used repeatedly to add addresses to
the recipient list (along with names,
see below
). Otherwise, when
Allow multiple
recipients
is unchecked, mail can only be sent to a single name and address. That
is, each additional
SetAddr
(or
LookupRcpt
) signal simply replaces the previously
specified address (and name) with the most recently specified address (and
name).
Besides setting the recipient address,
the
SetAddr
signal acts as a “trigger,” taking
the most recently specified recipient name (value set with
SetRcptName
), along
with the present value for recipient address, and adding both to the recipient list.
Because of this aspect of the
SetAddr
signal, it is imperative that the
SetRcptName
signal is sent before the
SetAddr
signal with which it is to be
associated.
This last point is particularly important when specifying multiple recipients. If the
signals are sent in reverse order, the results will be completely erroneous: The first
address has no
SetRcptName
signal associated with it (and uses the default
name); each subsequent address is associated with the name intended for the
previous address; and the last
SetRcptName
signal is not in the list at all because
there is no subsequent
SetAddr
signal before the
SendNow
signal is issued.
If the
SendNow
signal is issued but no address has been set (by any method), the
following error message is sent back to the control system:
No recipient specified -- mail cannot be sent.
If, however, a null (blank) address is specified, the default recipient address
specified in the e-Mailer signal block definition is used instead. In this case, the
name is also checked, and if it too is null, the default recipient name is utilized.
If the default is also null (and all other addresses in the recipient list are also null),
attempts to send the mail are rejected by the SMTP server (a message is posted to
the log).
Note that the default’s initial value (for a newly-defined e-mailer signal block) is
null. Fill the default to send all (unaddressed) mail to a single address.
The recipient list is reset to the default by the
ClearNames, NewMail,
and
SendNow
signals.
Note that this signal does not actually send any mail. Subsequent use of the
SendNow
signal is required to actually send a message.
See Also
The other “Set” signals (
SetFromName, SetRcptName, SetSubj,
and
SetBody
).
Other methods of setting the recipient address are: The
LookupRcpt
signal, and
manually picking a recipient from the bound recipient scroller.