How to broadcast an e-mail message to group audience?

Events happening in the community are now at Drupal community events on www.drupal.org.
AndrzejG's picture

Organic Groups for Drupal 7 have the subscription notifiaction based on Rules. However, there is no solution for admin to send e-mail to all members of the group (audience broadcasting). So, I think it should be possible to modify this notification a little in order to get the audience broadcasting service.

Let's say we create the Content type "Broadcast" with the title and body only, and the remaining work would be done by the Rules. However, as I'm not a coder, I don't know how to modify subscription notification. It looks like the following:

{ "rules_og_member_active" : {
    "LABEL" : "OG member subscribe (Active)",
    "PLUGIN" : "reaction rule",
    "REQUIRES" : [ "rules", "og" ],
    "ON" : [ "og_membership_insert" ],
    "IF" : [
      { "data_is" : { "data" : [ "og-membership:entity-type" ], "value" : "user" } },
      { "data_is" : { "data" : [ "og-membership:state" ], "value" : "1" } }
    ],
    "DO" : [
      { "entity_fetch" : {
          "USING" : { "type" : "user", "id" : [ "og-membership:etid" ] },
          "PROVIDE" : { "entity_fetched" : { "subscribed_user" : "Subscribed user" } }
        }
      },
      { "mail" : {
          "to" : [ "subscribed-user:mail" ],
          "subject" : "Your request re group '[og_membership:group:label]'\r\n",
          "message" : "[subscribed_user:name],\r\n\r\n Your request to the group '[og_membership:group:label]' is approved"
        }
      },
      { "og_get_managers_from_group" : {
          "USING" : { "group" : [ "og-membership:group" ] },
          "PROVIDE" : { "group_manager" : { "group_manager" : "Group manager" } }
        }
      },
      { "mail" : {
          "to" : [ "group-manager:mail" ],
          "subject" : "[subscribed_user:name] przyst\u0105pi\u0142 do grupy [og_membership:group:label]",
          "message" : "[group_manager:name],\r\n\r\n[subscribed_user:name] przyst\u0105pi\u0142 do grupy [og_membership:group:label] pod adresem [og_membership:group:url]"
        }
      }
    ]
  }
}

The first e-mail should be modified (I changed the subject and message a little for simplicity).

There is a replacement pattern [site:current-group:members:] for the list of members in group. However, I don't know how to make Rules to loop the list and send an e-mail from the saved form of "Broadcast".

Please help.

Rules

Group organizers

Group categories

Categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: