Send node as HTML formatted email to all users of a role

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
victorhugoa's picture

I have a RULE that works well:

  1. After saving a new content of type DEMO
  2. Send node as HTML formatted email
    Parameter: Send email to:doe@example.com,jane@test.com

What I need is to send the same Action but to a "users of a role", something like:

  1. After saving a new content of type DEMO
  2. Send node as HTML formatted email
    Parameter: Send email to: Roles: Editor ---RULES does not allow to add roles here---

Is there any module that can expand this function in RULES? Or is there some way to achieve this directly within RULES?

Comments

loop through the email addresses

tripper54's picture

You can do this within rules. You'll need to load all users with the role, then loop through them and send an email to each one.

Note you might get into trouble with execution time depending on how many users you are looping through.

If you find this happens you'll have to figure out some way to run the process in batches.

Rules

Group organizers

Group categories

Categories

Group notifications

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