Smtp_Subst - Cisco ASR 9000 Serie Configuration Manuals

Aggregation services router system
Table of Contents

Advertisement

SMTP Library Command Extensions
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] {
}
if [catch {smtp_send_email $result} result] {
}

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
e-mail_template
Cisco ASR 9000 Series Aggregation Services Router System Monitoring Configuration Guide, Release 4.2.x
180
puts stderr $result
exit 1
puts stderr $result
exit 1
Configuring and Managing Embedded Event Manager Policies
(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.

Advertisement

Table of Contents
loading

Table of Contents