cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
1465
Views
0
Helpful
3
Replies

TCL email script with smtp auth

Krasnoperov
Level 1
Level 1

hi

Has anybody have script like this http://forums.cisco.com/eforum/servlet/EEM?page=eem&fn=script&scriptId=921 , but with SMTP  authentication, for some reason I have to have sent email via gmail.com

thx

1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

In the future, you should post questions about scripting to the Network Infrastructure > Network Management community.

SMTP auth was added in EEM 3.0.  It's very easy to use.  Just adjust your message template, and change the SMTP server host to:

Mailservername: user:pass@smtp.company.com

View solution in original post

3 Replies 3

Joe Clarke
Cisco Employee
Cisco Employee

In the future, you should post questions about scripting to the Network Infrastructure > Network Management community.

SMTP auth was added in EEM 3.0.  It's very easy to use.  Just adjust your message template, and change the SMTP server host to:

Mailservername: user:pass@smtp.company.com

thanks a lot Joseph

next time I wil post to Network Infrastructure > Network Management community

but I have one more question, have you any idea how to insert in body of this message something like output of command for example 'sh ip int brief'

thanks in advance

Edit the script, and change line 97 to:

  if [catch {cli_exec $cli(fd) "show ip int brief"} result] {

You can continue to add blocks like , then append $result to the $show_version variable.  For example:

  if [catch {cli_exec $cli(fd) "show ip route"} result] {
    error $result $errorInfo
  }

  append show_version $result

Then all of those commands' outputs will be sent in the email body.

Review Cisco Networking for a $25 gift card