title: How to send message to multiple clients from ejabberd server
body: <p>I have just started on with ejabberd server.
  My question is how to send message from ejabberd server to multiple clients. I was able to send message to a single client using the command:</p>
  
  <pre><code>ejabberdctl send_message chat 192.168.33.50 user1@192.168.33.50 "subject" "message from server"
  </code></pre>
  
  <p>(where 192.168.33.50 is the IP address of the machine running ejabberd)
  However, I could not find a way to send to multiple clients at once.
  I suppose the method would be to create a group, add users to the group and send message to the group.</p>
  
  <p>I tried to the following commands to create a group and add users to it:</p>
  
  <pre><code>ejabberdctl srg_create group1 192.168.33.50 "group1" "group1" "group1"
  ejabberdctl srg_user_add user1 192.168.33.50 group1 192.168.33.50
  ejabberdctl srg_user_add user2 192.168.33.50 group1 192.168.33.50
  </code></pre>
  
  <p>However, when I tried sending message with the following command using the group name instead of user name, no message was sent from the server:</p>
  
  <pre><code>ejabberdctl send_message chat 192.168.33.50 group1@192.168.33.50 "subject" "message from server"
  </code></pre>
  
  <p>So I wanted to know how I can achieve my use case of sending messages to multiple clients from the ejabberd server?</p>