Smtp_Subst - Cisco Catalyst 2960 series Configuration Manual

Consolidated platform configuration guide, ios release 15.2(4)e
Hide thumbs Also See for Catalyst 2960 series:
Table of Contents

Advertisement

Sample Scripts
After all needed global variables in the e-mail template are defined:

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
Result String
The text of the e-mail template file with all the global variables substituted.
Set _cerrno
• cannot open e-mail template file
• cannot close e-mail template file
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
}
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
(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.
smtp_subst
1993

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents