ejabberd - Comments for "How to send message to group of users?" https://www.ejabberd.im/forum/28762/how-send-message-group-users en sinha.archit wrote: I was https://www.ejabberd.im/forum/28762/how-send-message-group-users#comment-67690 <div class="quote-msg"> <div class="quote-author"><em>sinha.archit</em> wrote:</div> <p>I was able to send message to a single client using the command:<br /> <code>ejabberdctl send_message chat 192.168.33.50 user1@192.168.33.50 &quot;subject&quot; &quot;message from server&quot;</code><br /> (where 192.168.33.50 is the IP address of the machine running ejabberd) </p></div> <p>hi sinha.archit. i have a problem to use the "send_message" command on my ejabberd server. When i use the command, it return nothing. The receiver did not receive any message from admin. May i know how u did that? is it any configuration needed?</p> Wed, 08 Nov 2017 04:46:28 +0000 asyraf comment 67690 at https://www.ejabberd.im 1. Yes, that is enough. 2.A) https://www.ejabberd.im/forum/28762/how-send-message-group-users#comment-67474 <p>1. Yes, that is enough.</p> <p>2.A) Send XMPP messages to specific XMPP addresses, see <a href="https://docs.ejabberd.im/admin/configuration/#mod-announce" title="https://docs.ejabberd.im/admin/configuration/#mod-announce">https://docs.ejabberd.im/admin/configuration/#mod-announce</a></p> <p>2.B) Send XMPP messages to the new multicast service, with some additional TO, CC, BCC elements, see example messages in <noindex><a href="https://xmpp.org/extensions/xep-0033.html" title="https://xmpp.org/extensions/xep-0033.html" rel="nofollow" >https://xmpp.org/extensions/xep-0033.html</a></noindex></p> <p>First try all this using an XMPP client. If you are happy with the results, then you can investigate how to perform those tasks with ejabberdctl programatically. I imagine "ejabberdctl send_message" will work.</p> Thu, 18 May 2017 21:11:08 +0000 badlop comment 67474 at https://www.ejabberd.im Thanks for the response. I am https://www.ejabberd.im/forum/28762/how-send-message-group-users#comment-67464 <p>Thanks for the response.<br /> I am just starting out on ejabberd and have a few more questions.</p> <p>1) How exactly do I use the methods A) and C) ( that is mod_annouce and mod_multicast). I have the following lines in my ejabberd config file (ejabberd.yml) under the heading "modules:"<br /> mod_announce: # recommends mod_adhoc<br /> access: announce<br /> and<br /> mod_multicast: {} ( this was commented earlier, I uncommented and restarted the server).<br /> Is that all that is required to enable these two modules?</p> <p>2)Once these modules are enabled, what command/method can I use to actually send message to all users(in case of mod_announce) or to multiple users(in case of mod_multicast). Meaning my question basically is what is the equivalent of ejabberdctl send_message for multiple users. I had a look at all the options of ejabberdctl and could not find anything.</p> <p>3) My use case is basically to send push notifications to clients using ejabberd. So I may need to send notifications to either one, many or all devices and therefore I don't think I can use the approach B since the server would decide which clients to send to, the clients won't know before hand and therefore they cannot join MUC room .</p> Tue, 16 May 2017 10:26:17 +0000 sinha.archit comment 67464 at https://www.ejabberd.im The Shared Roster Group https://www.ejabberd.im/forum/28762/how-send-message-group-users#comment-67443 <p>The Shared Roster Group feature is designed for sharing roster contacts and presence, not messages. It seems a cool idea, by the way.</p> <p>I can think three ways:<br /> A) If you want to send to all the accounts in the server, use mod_announce</p> <p>B) If you just want to send to a specific list of users, they should have joined a MUC room, then you can send a message to that room, and the server delivers the message to all the room occupants.</p> <p>C) If you enable mod_multicast, you can send the message to the multicast service and provide the multiple destinations as CC, see <noindex><a href="https://xmpp.org/extensions/xep-0033.html" title="https://xmpp.org/extensions/xep-0033.html" rel="nofollow" >https://xmpp.org/extensions/xep-0033.html</a></noindex></p> Fri, 05 May 2017 10:52:23 +0000 badlop comment 67443 at https://www.ejabberd.im