Completely disable mailing list mode?

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


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?

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.


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

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.


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?


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.

1 Like

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

1 Like

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)

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”

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.

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


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

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.


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:


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:


Love this solution. Thanks to whoever made it!

1 Like

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'

Try UserOption.update_all(mailing_list_mode: false)


Perfect!! Thanks!!


1 Like