Completely disable mailing list mode?


(Jesse Perry) #1

Does any one know of a way to easily hide/disable the option for users to enable “mailing list mode”?

In my experience, this is almost always enabled by accident. People click it thinking it sounds good, but then they don’t realize what they’re actually signing up for and all the ensuing emails to come. I notice in my Mandrill stats, that for people that check this box, they quickly stop engaging with emails from Discourse.

While they were highly engaged before, the influx of emails causes them to either ignore or maybe set up a mail rule to auto-archive these emails. My assumption is they don’t know how to turn off what they turned on. This obviously is a negative consequence because they then stop seeing the regular digest emails too, etc.

I would rather just completely disable the option for all users. Is there any front-end or back-end way to do this cleanly?

Thanks!!


"Daily updates" option for mailing list mode
(Jeff Atwood) #2

I wonder if we should put this option behind a confirmation dialog @sam since it is dangerous.


(Felix Freiberger) #3

Maybe this could also be decided dynamically: If statistics shows that the user ought to expect a lot of emails (let’s say more than 10 per day), show the warning – but suppress it for low-volume installs?


(Sam Saffron) #4

I am ok with adding a dialog here, but think we should wrap it in a div so it can be easily hidden via css. or maybe even site setting disable. Some less technical sites may want to avoid this option altogether.


(Jesse Perry) #5

Yeah my site is very untechnical and I think even a confirmation dialog might be confusing :wink:


(Erlend Sogge Heggen) #6

In fact, I thought that was how it worked for a very long time. The wording around the “mailing list mode” is rather inconsistent, so I never knew exactly what to look for in admin/user settings.

It’s not just dangerous as info-overload for the user, it’s a dangerous setting for big sites that are relying on free e-mail plans as well, since many users on mailing list mode will quickly bring you past your allowed limit of monthly sendouts.


(Jeff Atwood) #7

Let’s start with a CSS class so it can be hidden then, that is easy.

@techapj can you take the css class for this one?


(Kane York) #8

Another option is a warning div when you turn it on, but the page was loaded with it turned off.

Warning: This will cause you to receive an e-mail for every single post made on the forum. This is usually a lot of e-mails. If this is not what you wanted, please uncheck the box.


(Kane York) #9

hey look it’s riking, you can tell because he’s advocating casual snark in the UI


(Arpit Jalan) #10

Sure, I just added the CSS class pref-mailing-list-mode.

@jesselperry adding this custom CSS will do the trick:

.user-preferences .pref-mailing-list-mode {
    display: none;
}

To turn off mailing list mode for all the existing users, run this command in console:

./launcher enter app
rails c
UserOption.update_all(mailing_list_mode: false)

How to hide the setting "Send me an email for every new post"?
Default other enable quoting
Previously selected user themes can override allowed themes
(Sam Saffron) #11

I really prefer a site setting, this leaves the problem of “what about all the existing members in the forum that have mailing list on”


(Jeff Atwood) #12

Can’t they just run a ruby console command to reset the setting on behalf of all users? Perhaps @techapj could edit his post above to include those instructions.


(Arpit Jalan) #13

Okay, I edited my post to add command for turning off mailing list mode for all the existing users.


(Jeff Atwood) #14

I believe @erlend_sh had a nice UI proposal here can you link it Erlend?


(Erlend Sogge Heggen) #15

My suggestion was regarding the options on the user-end.

This topic on the other hand seems to be about disabling the option site-wide for all users, which I think is also an important setting.


(James Kiesel) #16

Playing around with email settings some in anticipation of the mailing list mode work, I’ve put in a PR to move this to a site setting here:


(Jeff Atwood) #17

There is a confirmation dialog on this setting now which estimates how many emails you’ll get per day so the user has an idea of how much spam email they’ll get by enabling this option. :bomb:


(Jesse Perry) #18

Love this solution. Thanks to whoever made it!


#19

I am trying to update all my users profiles to turn off mailing list mode, however, I get an error when issuing the rails command:

./launcher enter app
rails c
User.update_all(mailing_list_mode: false)

The error is:

ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column "mailing_list_mode" of relation "users" does not exist
LINE 1: UPDATE "users" SET "mailing_list_mode" = 'f'
                       ^
: UPDATE "users" SET "mailing_list_mode" = 'f'
from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-mini-profiler-0.10.1/lib/patches/db/pg.rb:90:in `exec'

(Rafael dos Santos Silva) #20

Try UserOption.update_all(mailing_list_mode: false)