Send messages from an application

Hi all,

I need to send messages to my users from Openfire. When an event occurs in database, for example, I need to send a message to certain kind of users, can I do this from Openfire?. And if possible, what languages or gateways are available?.

Thanks in advance for your help,

Ricardo