[ejabberd] Sending messages from external script

Badlop badlop at gmail.com
Fri Aug 10 15:00:09 MSK 2012


On 7 August 2012 17:26, Alexander Zhebrak <fata2ex at gmail.com> wrote:
> Hi there.
>
> I have a daemon on Erlang that should send messages to the specific user
> (maybe to many users). How can I implement this?

There is a dirty simple solution:
Download, compile, install and enable mod_admin_extra

Then run in the shell:
ejabberdctl send_message_chat sender at localhost user1 at localhost hi_you

> We will have more than 100k users online.

If you want to send to ALL the users online in your server, run this:
ejabberdctl send_message_chat joe at localhost localhost/announce/online hi_you
(make sure the account joe at localhost is admin in ejabberd.cfg)

But if you want to send to many arbitrary users, not to all, then you
may prefer to run this command using XML-RPC, which is faster than
ejabberdctl. In that case, you have to install ejabberd_xmlrpc to use
it.


---
Badlop
ProcessOne


More information about the ejabberd mailing list