![Cisco ASR 9000 Serie Скачать руководство пользователя страница 196](http://html.mh-extra.com/html/cisco/asr-9000-serie/asr-9000-serie_configuration-manuals_66679196.webp)
Result String
None
Set _cerrno
•
Wrong 1st line format
—
Mailservername:list of server names.
•
Wrong 2nd line format
—
From:from-address.
•
Wrong 3rd line format
—
To:list of to-addresses.
•
Wrong 4th line format
—
CC:list of cc-addresses.
•
Error connecting to mail server:
—
$sock closed by remote server (where $sock is the name of the socket
opened to the mail server).
•
Error connecting to mail server:
—
$sock reply code is $k instead of the service ready greeting (where
$sock is the name of the socket opened to the mail server; $k is the reply code of $sock).
•
Error connecting to mail server:
—
cannot connect to all the candidate mail servers.
•
Error disconnecting from mail server:
—
$sock closed by remote server (where $sock is the name of the
socket opened to the mail server).
Sample Scripts
After all needed global variables in the e-mail template are defined:
if [catch {smtp_subst [file join $tcl_library email_template_sm]} result] {
puts stderr $result
exit 1
}
if [catch {smtp_send_email $result} result] {
puts stderr $result
exit 1
}
smtp_subst
Given an e-mail template file e-mail_template, substitutes each global variable in the file by its user-defined
value. Returns the text of the file after substitution.
Syntax
smtp_subst e-mail_template
Arguments
(Mandatory) Name of an e-mail template file in which
global variables need to be substituted by a
user-defined value. An example filename could be
/disk0://example.template which represents a file
named example.template in a top-level directory on
an ATA flash disk in slot 0.
e-mail_template
Cisco ASR 9000 Series Aggregation Services Router System Monitoring Configuration Guide, Release 4.2.x
180
Configuring and Managing Embedded Event Manager Policies
SMTP Library Command Extensions