Jump to content

Topic on Project:Support desk/Flow

[RESOLVED] How to enable email notification for watchlist changes by default

5
Ckoerner (talkcontribs)

Perhaps I'm dense, but reading the manual and numerous Google searches keep pointing me to "$wgEnotifWatchlist" as a solution, but new (and existing) users do not get the email notifications when this is set to true.

How can you set MediaWiki to send email notifications to changes on editors watchlist by default? This will go perfectly with the new default (as of 1.23) to add new pages and edits to a editors watchlist by default.

MediaWiki 1.23wmf8, PHP 5.3.3

88.130.94.158 (talkcontribs)

Hi!

First upload a small PHP script to your server and try the mail function of PHP with that one. That should tell you, if sending mails works at all or if it's already broken on the level of PHP. Do you receive those mails?

For MediaWiki, first $wgEmailAuthentication must be true; otherwise $wgEmailAuthentication will be ignored. Then with $wgEmailAuthentication set to true, MediaWiki should send out mails. If $wgEmailAuthentication is false, MediaWiki will not send mails. Finally, $wgEnotifWatchlist must be true in order to get mails for watchlist changes. Do you get mails with these settings?

Ckoerner (talkcontribs)

Thank you for replying. I'm sorry I wasn't very clear on my issue. Editors can (and do) receive email notifications when pages on their watchlist are changed. What I'm trying to figure out is how to make the user preference of "Email me when a page or file on my watchlist is changed" set to be on by default.

88.130.90.34 (talkcontribs)

In that case you will be interested in $wgDefaultUserOptions.

$wgDefaultUserOptions['enotifwatchlistpages'] = true;

should be the option you are looking for. This will change the default for all new users and for all users, who have not customized their preferences. Existing user accounts who had the (previous) default option and didn't set it explicitly (which means that it's not stored in the database) will then use the new default.

For old users, who have changed the default, you can use the maintenance script userOptions.php to change their setting as well:

php userOptions.php enotifwatchlistpages --old 0 --new 1

This should change the value for those old users, who already have it in the DB = who changed from the default.

Ckoerner (talkcontribs)

Thank you random stranger on the Internet. I appreciate your help. This is exactly what I was looking for.

Reply to "[RESOLVED] How to enable email notification for watchlist changes by default"