here is a peice of code that will do it. i am not sure if there is a 
better way of triggering a windows executable than alertif. if so let 
me know.

trigger=ParamTrigger( "Want to send email", "SEnd IM");
if(trigger){
_TRACE("sending alerts");
AlertIf(True, "exec c:\\youpath\\sendIM.rb"," sending alert",0,1);
}
 
_SECTION_END();

to run this you need, 
1. Ruby(free)
2. 'xmpp4r/client' gem.(free)

SendIM.rb is below
require 'xmpp4r/client'
include Jabber # Makes using it a bit easier as we don't need to 
prepend Jabber:: to everything
# Jabber::debug = true # Uncomment this if you want to see what's 
being sent and received!


def sendMessage(subject,body)
jid = JID::new('[EMAIL PROTECTED]')
password = 'qazwsx123'
        begin


                cl = Client::new(jid)
                cl.connect
                cl.auth(password)
                to = "[EMAIL PROTECTED]"
                
                
                m = Message::new(to, subject + "\n" + body).set_type
(:normal).set_id('1').set_subject(subject)
                cl.send m


        end
end
if(nil|ARGV[0]) then
        sendMessage("Scan Alert" , ARGV[0])
end



Reply via email to