Page MenuHomePhabricator

Don't attempt to send email to users without any configured in Preferences
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

From what I can see at Logstash, TranslationNotifications is attempting to send emails to users without any email address set in their Preferences, obviously causing errors. The extension should not attempt to do that. See e.g. this case among others.

Addenda: Perhaps TranslationNotifications should be automatically unsubscribing these users when this happens, either immediately or after X unsuccessful attempts. An Echo notification could be sent telling the user why they have been unsubscribed as well.

Event Timeline

MarcoAurelio changed the subtype of this task from "Task" to "Bug Report".Apr 19 2023, 5:14 PM
MarcoAurelio added a project: Language-Team.
Nikerabbit removed a project: Language-Team.
Nikerabbit moved this task from Backlog to Bugs on the TranslationNotifications board.

Change 915128 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/TranslationNotifications@master] TranslationNotificationsSubmitJob: Check if user has email

https://gerrit.wikimedia.org/r/915128

Change 915129 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/TranslationNotifications@master] DigestEmailer: Check if email is set for user before sending

https://gerrit.wikimedia.org/r/915129

Thank you @abi_ - Yes, that example is from a digest. In any case, digests are broken (for users with or without email set) per T333227: Translation notifications via email digest is broken.

Nikerabbit set the point value for this task to 1.

Change 915128 merged by jenkins-bot:

[mediawiki/extensions/TranslationNotifications@master] TranslationNotificationsSubmitJob: Check if user can receive email

https://gerrit.wikimedia.org/r/915128

Change 915129 merged by jenkins-bot:

[mediawiki/extensions/TranslationNotifications@master] DigestEmailer: Check if email can be sent to user before sending

https://gerrit.wikimedia.org/r/915129

I tested this by running the DigestEmailer.php script manually, and I see the following message for certain users: Email cannot be sent to this user. Skipping...