Page MenuHomePhabricator

sendBulkEmails.php should have an option to ignore user preferences
Open, Needs TriagePublic

Description

sendBulkEmails.php skips sending to users who have disabled the "Allow other users to email me" preference. This makes sense for some types of emails, but other times it doesn't. It should be optional.

Event Timeline

Annoyingly, sendBulkEmails.php does not emails users who have unset the allowemail user preference ("Allow other users to email me") which is not really relevant for this kind of email. So I'll use a copy of it with a trivial change:

32c32,37
< require_once __DIR__ . '/WikimediaMaintenance.php';
---
> $IP = getenv( 'MW_INSTALL_PATH' );
> if ( $IP === false ) {
> 	$IP = __DIR__ . '/../../..';
> }
> 
> require_once "$IP/extensions/WikimediaMaintenance/WikimediaMaintenance.php";
235c240
< 		if ( !$user->canReceiveEmail() ) {
---
> 		if ( !$user->isEmailConfirmed() ) {