03-23-2015 07:34 AM
I have been unable to successfully configure the Cisco IOS Embedded Event Manager (EEM) "action mail" command when the "server-address" includes two "@" symbols. The SMTP server that I will be using utilizes the user's email address as the username. This places two "@" symbols in the "server-address". This results in a "server-address" with the format: user@company.com:password@host.company.com. When using this format, the router does not attempt to contact the SMTP server. When removing the first "@" the router attempts to contact the SMTP server.
I have attempted to solve this problem by placing double quotes (") around the "user@company.com" and separately by placing back slant (\) in front of the first "@". Neither change solved the problem.
The router is a Cisco 2811 running IOS c2800nm-spservicesk9-mz.124-22.T4.bin. Is there a work-around so that an SMTP server utilizing the complete user email address as the username can be used as the server associated with the EEM "action email" command?
03-23-2015 08:11 AM
Unfortunately, this does not work in applets. The workaround is to convert your applet to a Tcl policy using http://www.marcuscom.com/convert_applet/ then install it as an EEM Tcl policy.
03-24-2015 06:29 AM
Hi
Once i had such a requirement & below just worked fine for me, you can also try!
I was trying just like you the same format "user@company.com:password@host.company.com. but mail was not going out.
Then I tried without password, and it worked for me. Try & let me know!
event manager session cli username USER
event manager applet TEST
event none maxrun 60
action 1.0 cli "show command"
action 2.0 mail server "mail.server.co.in" to "example@cisco.com" from "example_2@cisco.com" subject "TESTING" body $_cli_result
action 3.0 syslog msg "Mail_Sent"
- Ashok
************************************************************************************************************
Please rate the useful post or mark as correct answer as it will help others looking for similar information
************************************************************************************************************
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide