Here is a method that you can use on most Windows, UNIX or Linux TEMS to send an email when a situation fire.
1 - define a SOAP server with the name of "soap" (this is fully described in the Administrator's Guide for ITM 6.2 page 154)- For the hub hostname specify localhost where the hub tems is running and for the port use 1918. Add a user sysadmin with update access. Restart the TEMS if necessary.
2 - open a text editor and save the following file (c:\IBM\ITM\cms\url.txt) with the only one line :
3 - open a text editor and save the following file (c:\IBM\ITM\cms\SEND_EMAIL.bat) with the content of the attached file.
In the content of the file, you will see the 5 parameters necessary to send an email. The most important parameter is the first one : the name or the IP@ of the SMTP server.
4 - use the command in a take action, or in the action of a situation or in any activity of a policy. For example :
SEND_EMAIL.bat SMTPserver email@example.com firstname.lastname@example.org "this is my subject" "this is the text of my message"
5 - If you want to send an email for each raised event in the TEMS, you can post a situation for the universal message :
IF Category == KO41041 TRUE
You can adjust a little this situation so that you get only some kind of messages.
This topic has been locked.
11 replies Latest Post - 2011-10-31T05:14:57Z by AparnaSV
Pinned topic Sending an email from ITM without using external product
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2011-10-31T05:14:57Z at 2011-10-31T05:14:57Z by AparnaSV
SystemAdmin 110000D4XK6057 PostsACCEPTED ANSWER
Re: Sending an email from ITM without using external product2008-08-15T15:19:10Z in response to pethomHi,
I want to thank you for creating this and helping others - it was a real Godsend.
Right now I have used the .bat file inside the ITM Situation Config but now I need to know how to embed attributes into the message to be sent. Is there anyway you can help?
Thanks in advance
Re: Sending an email from ITM without using external product2011-05-07T16:49:54Z in response to pethomhi,
please i've a problem configuring the soap in my Hub TEMS (centos server). when executing itmcmd manage i have this message: KCI0412E A problem occurred. see logs/CandleManage.logs for details
in the attached file i've replied what it says in this log; the problem is that i don't know what i'm about to do
Re: Sending an email from ITM without using external product2011-05-07T18:27:09Z in response to NNAit seems i've a problem to attach my file so i'm going to write what it says in candlemanage.log;
i'm really sorry
<< Exception in thread "main" java.awt.HeadlessException:
NO X11 DISPLAY variable was set, but this program performed an operation which requires it
at ITMInstall.JFrame1.main(window.java:1551) >>
Re: Sending an email from ITM without using external product2011-05-08T19:31:14Z in response to NNAYou need to export your DISPLAY to your workstation or you need to ssh and forward your display thru the connection, you would run the command:
ssh -fX host xterm
ssh -fY host xterm
then you can run the itmcmd manage from the xterm
Of course you need an X server running in your workstation to be able to open X windows, something like eXceed from Hummingbird or the free X server from cygwin.
Re: Sending an email from ITM without using external product2011-05-09T19:38:20Z in response to ateo.duranTHANKS for your answ.
i try what you said but i've a problem when typing ssh -fx host xterm
there is a new message from the console: ssh: connect to host host 22: Connection timed out
please is there any solution for this situation?
Re: Sending an email from ITM without using external product2011-05-09T20:06:00Z in response to NNAThe message you posted seems to indicate that you literally used host. I am sorry I was not clear. host in (ssh -fX host xterm) is your Hub TEMS server hostname or IP address. I just gave you an example on how to connect. You need to find out how to connect to your system and tunnel or forward the X window to your workstation.
Have you tried just to export the DISPLAY variable to point to a workstation running an X server software ?
Re: Sending an email from ITM without using external product2011-05-10T10:35:35Z in response to ateo.duranyes;
i try to export the display variable to my PC typing export DISPLAY = my machine IP address:0
then i follow by xeyes & or xterm &, but now i've this result: -bash: xeyes or xterm: command not found
first i though it was a problem of directories where each of them are installed but nothing change
please any idea about this? i also first though it's a centos command problem but it not true...
very sorry to bother you,
Re: Sending an email from ITM without using external product2011-05-10T12:48:53Z in response to NNAMay be you do not have the PATH setup or the xterm is not installed in your server.
These problems you have are not ITM related at all, but if you solve these then you can use itmcmd manage
Would it be possible for you to find someone in your site to help your with these X related problems ?