You can generate Event Manager Tcl scripts using Progrizon's Policy Builder at:
http://progrizon.com/support/pb/pb.php Here is the Tcl code to send an email from an EEM script: namespace import ::cisco::eem::* namespace import ::cisco::lib::* set email_message "Mailservername: username:[email protected] From: [email protected] To: [email protected] Cc: [email protected] Subject: Email Subject This is the email body" if {[catch {smtp_send_email $email_message} result]} { puts stderr $result } -Mihyar Baroudi ------------------------------ Message: 3 Date: Sun, 17 Apr 2011 09:55:31 +0300 From: Ziv Leyes <[email protected]> To: "[email protected]" <[email protected]> Subject: Re: [c-nsp] Event manager mail Message-ID: <[email protected]> Content-Type: text/plain; charset="us-ascii" I was about to answer you the same, about the bug. Do you care to share the tcl script with us? Ziv -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Jan Gregor Sent: Thursday, April 14, 2011 4:48 PM To: [email protected] Subject: Re: [c-nsp] Event manager mail Hello, just letting all know, this is a known bug CSCsl53037 which is AFAIK not fixed in 12.4 train. I have fixed this with an Tcl script doing the same thing, only correctly. Best regards, Jan On 04/14/2011 10:07 AM, Jan Gregor wrote: > Hi guys, > > I have stumbled across weird error when configuring mail notification > from Event Manager of IOS router. The mail server parses the email and > tags it as malformed with this error: > X-Amavis-Alert: BAD HEADER SECTION MIME error: error: unexpected end > of header > > And indeed, when I check the message in quarantine, there is no MIME > header there at all. > > The IOS version is c1841-advipservicesk9-mz.124-13.bin (yeah, I know > it is old) and configuration is this: > > event manager applet email_configured > event syslog pattern ".*%SYS-5-CONFIG_I.*" > action 1.0 info type routername > action 3.0 mail server "$_email_server" to "[email protected]" from > "[email protected]" subject "test $_syslog_msg" body "$_syslog_msg" > > Any ideas how to fix this? > > Best regards, > > Jan _______________________________________________ cisco-nsp mailing list [email protected] https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
