Completely disable mailing list mode?

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!!

4 Likes

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

4 Likes

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.

6 Likes

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.

3 Likes

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?

2 Likes

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)
3 Likes

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.

7 Likes

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.

2 Likes

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:
https://github.com/discourse/discourse/pull/4059

8 Likes

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:

4 Likes

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)

4 Likes