cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1036
Views
0
Helpful
1
Replies

Check that EEM applet is able to send email otherwise retry sending the email.

deanc0542
Level 1
Level 1

I'm trying to find a way to try sending an email without my event manager applet crashing if this fails. 

09_05_46 ---- May 19 08:16:49.176 UTC: %HA_EM-3-FMPD_SMTP: Error occurred when sending mail to SMTP server: smtp-gateway : error in connecting to SMTP server
09_05_46 ---- May 19 08:16:49.176 UTC: %HA_EM-3-FMPD_ERROR: Error executing applet IOSDownloader statement 98.0

Is it possible to do something like a try and catch with using EEM scripts.

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

You can use the error handler in EEM.

action X handle-error type ignore

Then you can test $_error to see if the value is other than FH_EOK.  When you want to install default error handling again, use "type exit"