cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1892
Views
0
Helpful
4
Replies

Sending an email notification to multiple recipients

rbunal
Level 1
Level 1

I have a simple EEM question.  How would I send an email notification to multiple recipients?

This is from an ASR 9000 TCL script.

...
if [catch {smtp_subst [file join $tcl_library email_template_cfg.tm]} result] {
    error $result $errorInfo

Something like: _email_to user1@domain.com,user2@domain.com

That's how it was done with an EEM applet on my old Cat 6500.

Thanks, Ron



4 Replies 4

Joe Clarke
Cisco Employee
Cisco Employee

The same will work in IOS-XR.  The Tcl code for email is the same in IOS and IOS-XR.

I got it to work with no commas between email addresses, used spaces instead.

would you mind sharing the whole script?

Im trying to get my Nexus 5k to send me an email when an error occurs and I am totally stuck.

Scott,

I just copied the sample script (I'm not a programmer)

sl_intf_down.tcl Sample Policy

from the document http://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/asr9k_r6-0/system-monitoring/configuration/guide/b_sysmon_cg60xasr9k/b_sysmon_cg60xasr9k_chapter_011.html#con_1217984

You need to set the appropriate environmental variables through the CLI

hostname cpu
domain-name example.com
event manager environment _email_server ms.example.net
event manager environment _email_to username@example.net
event manager environment _email_from engineer@example.net
event manager environment _email_cc projectgroup@example.net

check the logs for clues as to why it might be failing. In my case, I was getting this error when I had commas between my email addresses.

Mar 28 10:23:28.858 EST: syslog_dev[93]: noscan PID-69476737: From SMTP server: 550 5.1.1 <,>... User unknown


I also had issues with the domain name. It was set in my running-config, but I had to set the event manager environment variable event manager environment _domainname domain.com

I hope that helps,
Ron
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: