Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

TCL email script with smtp auth

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
Cisco Employee

Re: TCL email script with smtp auth

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
3 REPLIES
Cisco Employee

Re: TCL email script with smtp auth

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
New Member

Re: TCL email script with smtp auth

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

Cisco Employee

Re: TCL email script with smtp auth

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.

1034
Views
0
Helpful
3
Replies