2

I want to send email notifications whenever a new content is published in the site. It would be helpful if I can do it by Actions - using Actions & Triggers I can use token to mail a single user, i.e. author of a node. But how do I send email notification to ALL authenticated users of my site?

P.S. It is necessary that emails appear in bcc field, to avoid Spam. I've searched a lot, but no specific solution was found.

2

You can use the Rules module, a more powerful version of actions and triggers.

Configure a rule as follows:

  • React on event: (Node) After saving new content
  • Action: (System) Send mail to all users of a role

However, you cannot select the authenticated role here. Instead, you will have to add another role to your site and use it instead. (You can create another rule to automatically add that role upon registration.)

Also, note that the Rules module has this warning about sending too many mails:

WARNING: This may cause problems if there are too many users of these roles on your site, as your server may not be able to handle all the mail requests all at once.

So if you have a lot of users this probably isn't a good solution.

  • Thanks, bro for the solution. Can you recommend anything that will not slow down things? Probably by writing some custom modules? – Shafiul May 1 '12 at 6:05
  • If I had an extremely large number of users, I would look at finding a third-party mailing list service to manage things and triggering that service from Rules. But I've never had that issue so I don't have any specific insights about how to go about that. – Patrick Kenny May 1 '12 at 6:11
  • The site probably has 300+ members currently, and more will be added... – Shafiul May 1 '12 at 6:13
  • Unfortunately, the Rules module doesn't define specifically what "too many users" is... It also depends on what your mail server will allow. The only way to know for sure is to try implementing it and if it works keep checking the error logs from time to time to make sure you don't run over the limit later. – Patrick Kenny May 1 '12 at 6:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.