Extension:Email notification

Email notification for changed watch listed and/or user_talk pages

 * This is the E-Mail Notification patch (enotif). It is based on MediaWiki version phase 3 CVS version 1.4 and discloses a reasonable scheme allowing for page change notifications.
 * You can bug-track this as Bugzilla feature request 454.
 * Maintainer of this feature: --Nyxos 21:36, 28 Sep 2004 (UTC) with the help of Markus Arndt -- thanks !!

How it works
The watching user X gets a short E-Mail:


 * when a watch listed page, listed in user X's watch list, changes
 * when the user_talk page of User X changes

A positive side-effect of the patch:


 * even when a user does not have set or does not want to reveal his/her e-mail address (&rarr; preferences), he or she can anyhow make use out of the visual marker (see below) which indicates new content since the last visit.

What you can expect - feature overview

 * The first version of E-Notif is mainly suited for small scale MediaWiki implementations, as personalised e-mails are sent out (name, pages changes expressed in local time) for every recipient. The program flow will be changed in a next version, so that bulk notification mails could be sent, depending on parameters.
 * However, the notification on (only) user_talk page changes could be enabled for even the largest WikiPedia, because the number of these page changes is surprisingly low and because only one mail needs to be sent - to the page owner. About only 800 alien user-talk page changes are committed per day (August 2004), which would result in the same number of enotifs.
 * All features are configurable by WikiAdmins in the DefaultSettings.php resp. LocalSettings.php - admins can enable or disable the sending of notifications for a) general pages of all name spaces and for b) user_talk pages separately.
 * The notification message texts are not hard-coded in the source but pages in the MediaWiki:namespace making use of named variables such as $PAGEEDITORUSERNAME and $PAGEEDITTIMESTAMPUTC (see real example below).
 * Your own changes never trigger a notification mail sent to yourself.
 * Minor edits will or will not trigger notification e-mails sent out depending on just another admin setting.
 * Changes on user_talk pages always trigger a notification to be sent (if not yet done) - no matter, if the page editor marked it as minor edit or not.
 * Global program flags in DefaultSettings.php set the defaults. As a sysop, you can fine-tune the email notification program according to your needs by using other settings in your LocalSettings.php (which then overwrite the defaults):
 * Only one mail is sent on the first page change. Further mails are suppressed until you re-visit the changed page or until you reset all notification flags by clicking once onto a new button in your watchlist page.
 * On the watchlist page, a new marker  updated (since my last visit) indicates such pages for which a notification mail was sent, meaning that the page has new contents since your last visit.
 * The marker is also shown on your recent changes page for these pages, you are watching (already marked 'bold) and which do have new contents since your last visit.
 * If you wish so, you can provisionally add not-yet existing page names to your watch list and you will receive an email notification as someone creates a page with that name. Again, you will see the marker flown there until you really visit the (in this case: new) pages with new contents.


 * Sexy for debuggers: two different (single) beeps on the server signal the sending of notification mails for pages and user_talk pages.

Named variables for sysop use in email subject and body template
Sysops can use the following named variables to compose the email notification message:

$WATCHINGUSERNAME $WATCHINGUSEREMAILADDR $PAGETITLE $PAGEEDITORNAMEANDEMAILADDR $PAGEEDITOR $PAGEEDITDATE (expressed in the watching user's local time) $PAGEEDITDATEUTC $PAGEMINOREDIT $PAGESUMMARY $WIKIADMINEMAILADDR

Program constants defined in DefaultSettings.php

 * 1) Patch for email notification on page changes T.Gries/M.Arndt 11.09.2004
 * 2) These are the defaults settings

$wgEmailNotificationLevel                     = 3;     # 0: disabled # 1: for user_talk pages only # This appears to be a possible start value even for large scale wikipedias, as even the English Wikipedia has only about 800 alien user-talk changes per day, according to Brion. # 2: for watch-listed pages only # 3: for all pages (watch-listed and user-talk pages) # suggested for small scale wikis $wgEmailNotificationForMinorEdits             = false; # false: "minor edits" on pages do not trigger notification mails. # Attention: every change on a user_talk page triggers a notification mail (if the user is not yet notified)

'''Attention, you might want to disable this. In any case, be careful with these parameters for system calls.''' $wgEmailNotificationSystembeepForWatchlistPages = '/usr/bin/beep -f 4000 -l 20 &'; # a system call with exactly this string as parameter is executed when such a mail is sent $wgEmailNotificationSystembeepForUserTalkPages = '/usr/bin/beep -f 2000 -l 20 &'; # ditto., but for UserTalk page changes Security advice: be careful with this system call parameters.
 * 1) The following strings are passed as parameters to two system calls.
 * 2) On our server, they call the beep 1.2.2 program with different frequencies f [Hz] and length l [msec]
 * 3) Beep 1.2.2 can be found on http://freshmeat.net/projects/beep/

Notification mail text template (delivered within the patch, module Languages.php)
email notification messagetext

Tom Gries/Markus Arndt Berlin/Munich September 2004