Action on the server when killing a player

Hi all, I have the following question: If your multiplayer game is running on a server and if you want to introduce a new feature to the game like sending an email (just as an example) when you kill a player, could you open a zmq port from the server and publish some messages that could be listened to by other, e.g. Python applications? What would be the easier way?