Emails only to users with specific group?


(Tumi) #1

Hi guys.

I want to setting that only a premium users will gave and emails about new posts etc. How to it?

I dont want to allow use email notification for new users with 0 post or 5 post. Can i set it?


(Felix Freiberger) #2

That’s not possible by default, you’d have to write a custom plugin to do this.


(Tumi) #3

How to do a custom plugin ? Any tutorials ?

Btw can i disbale email notification at all ?


(Joshua Rosenfeld) #4

You can disable email entirely using the disable emails site setting, but that prevents every email from being sent, even required ones like “activate your account” or “password reset”.

For plugins, see Beginner's Guide to Creating Discourse Plugins - Part 1.


(Reid Van Melle) #5

I kind of have a follow-on topic on this subject. We have a similar use case — i.e. we want generally to disable emails across the site, but now would like to specifically enable digest emails for specific “moderator” users.

Since we create all of the user accounts via the Discourse API, one approach we have considered is using fake/black-hole email accounts for our auto-created user accounts. Would this cause any issues for our Discourse server? or have other unintended negative consequences?


(Mittineague) #6

Even as a temporary work-around that doesn’t feel like a good ideal me. Caveat: I don’t know all the Discourse core code.

Putting email sends into a queue only to purposely not complete the process seems less than best approach.

Email addresses are an integral part of Discourse, I don’t know everything, but one is code that deals with Bounces.

And what happens if it is ever decided to let members get emails? Could everything done be undone without much pain?

IMHO, if not done in core, the first step would be to bang together a plugin. If something needed to be done in core to facilitate the plugin, petition!


(Reid Van Melle) #7

Thanks for the response — in our particular case, we would not even be sending email addresses for our users except that they are required as part of account creation. We have turned off all emails and just using the API core. However, moderators would potentially like to use email digest and are the only users with access to the website.

As another approach, we are potentially going to use a slack integration which may accomplish the same goal.