Extension:Email notification

Email notification on changes of watch-listed pages and/or user_talk pages

 * This is main page of the E-Mail Notification (enotif) which discloses a reasonable scheme allowing for page change notifications via e-mail.

See also version history.


 * Currently available are the patches for:
 * MediaWiki release version 1.3.7
 * [[Image:new.png]] Enotif v1.33 for MediaWiki 1.3.7 incl. diff file. Available as one tgz file URL follows soon Tom Gries (talk) mail me 23:12, 29 Oct 2004 (UTC)
 * MediaWiki developer's version from the CVS (HEAD 1.4):
 * use the enotif v1.22 diff/patch to patch your own checkout from CVS. The diff patch is uploaded to http://bugzilla.wikipedia.org/show_bug.cgi?id=454.


 * Older versions (not recommended because of potential security issues in older MediaWiki versions):
 * MediaWiki release version 1.3.6
 * Enotif v1.21 for MediaWiki 1.3.6 incl. diff file is available as one tgz file: http://www.tgries.de/mw/enotif/mw136_incl_enotif121.tgz (1,7 MB)
 * MediaWiki release version 1.3.5
 * Enotif v1.2 for MediaWiki 1.3.5 incl. diff file is available as one tgz file: http://www.tgries.de/mw/enotif/mw1.3.5_incl_enotif1.2.tgz (2,7 MB)

Maintainer of this feature are Tom Gries and Markus Arndt, Germany. August-October 2004.

How it works
The watching user X gets a short E-Mail if he/she has stored an email address in the preferences


 * when someone else changes a page listed in user X's watch list (watch-listed page)
 * when someone else changes the user_talk page of user x

Users with or without an email address in preferences can enjoy a side-effect of enotif:


 * together with enotif the marker  updated (since my last visit) is introduced indicating new contents on watch-listed pages since one's last visit. The marker can be seen on the watchlist page and on the recent-changes page close to the bold-titled page names of pages being watched. Be reminded: own changes do never trigger notification mails or markers, so you are only informed about changes of somebody else.

What you can expect - feature overview

 * The E-Notif patch was developed for small- to medium-scale MediaWiki implementations. Personalised e-mails (with recipient's name; pages changes expressed in local time) for every watching user. [The program flow will be changed next versions to allow bulk notification mails to be sent, depending on parameters, to save procession time and bandwidth.]


 * The sub-feature notification on user_talk page (UTP) changes could be enabled even for the largest WikiPedia, because the number of UTP changes is surprisingly low - according to Brion Vibber. About 800 alien UTP changes (changes by others than yourself) per day have been counted in August 2004, which would result in the same (relatively low) number of enotifs sent to the UTP owners.


 * The features are configurable (enable/disable) in module DefaultSettings.php respectively LocalSettings.php for the WikiAdmin, who can spearately allow or disallow notifications for changes on
 * general pages (all name spaces) (O) and/or
 * user_talk pages. (O)


 * The notification message is one page ((*): four pages) in MediaWiki:namespace and you can use therein named variables such as $PAGEEDITORUSERNAME and $PAGEEDITTIMESTAMPUTC (see real example below).


 * (*) The notification message is sent out comprising a direkt link to the difference view (diff) between the current page version (when user opens the mail and clicks onto that link) and the last one the watching user has seen (i.e. the page version just before the page change notification was sent). This appears to be very convenient and was requested by Chris and other users.


 * Your own changes do never trigger a notification mail sent to yourself.


 * Minor edits do or do not trigger notification e-mails sent out, depending on just another admin setting. (O)


 * All UTP changes trigger a notification to be sent, no matter whether the changing editor declared the change as minor edit or not.


 * 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. A new button is introduced for this purpose on the 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. (O)


 * The marker is also shown on your recent changes page and on page history(*) pages for the pages watched by you (already marked bold) and which do have new contents since your last visit. (O)


 * (*) Recent changes view and page(article) footers show number of watching users. (O)(O)


 * If you wish so, you can as usual 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.


 * Debuggers' option: two different single beeps on the server signal the sending of notification mails for pages and user_talk pages (default: disabled, see Email notification list of changes). (O)


 * (*) implemented in Enotif versions > 1.21
 * (O) Admin options in DefaultSettings.php or LocalSettings.php allow to disable these extensions.

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

The variables ending with "_QP" are needed for composing correct mail headers for watching usernames and pagetitles with non-ASCII characters, if you want to have these texts there and not only in the mail body. Do not use _QP variables in the email body.

$WATCHINGUSERNAME $WATCHINGUSERNAME_QP (QP = "quoted-printable", only for use in mail headers) $WATCHINGUSEREMAILADDR $PAGETITLE $PAGETITLE_QP (QP = "quoted-printable", only for use in mail headers) $PAGEEDITORNAMEANDEMAILADDR $PAGEEDITORNAMEANDEMAILADDR_QP (QP = "quoted-printable", only for use in mail headers) $PAGEEDITOR $PAGEEDITOR_QP (QP = "quoted-printable", only for use in mail headers) $PAGEEDITDATE (expresses the page edit date/time in the watching user's local time) $PAGEEDITDATEUTC $PAGEMINOREDIT $PAGESUMMARY $WIKIADMINEMAILADDR

Program constants defined in DefaultSettings.php
= superseded will be corrected as soon as possible =


 * 1) Patch for email notification on page changes T.Gries/M.Arndt 11.09.2004


 * 1) 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, these features are disabled by default. However, be careful with the parameters for the two system calls.''' $wgEmailNotificationSystembeepForWatchlistPages = ''; # empty string = disabled = default $wgEmailNotificationSystembeepForUserTalkPages = ''; # empty string = disabled = default Again the security advice: be careful with these two 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/
 * 1) $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
 * 2) $wgEmailNotificationSystembeepForUserTalkPages  = '/usr/bin/beep -f 2000 -l 20 &'; # ditto., but for UserTalk page changes

Notification mail headers and body templates (delivered within Enotif versions > 1.21)
Note: $PAGEEDITORNAMEANDEMAILADDR_QP is replaced with the page editor's email address, if the person has not disabled it (in user preferences: to show the email address to other users). In other words, Enotif does pay attention to users' privacy settings.

The following four templates are included in module /languages/Language.php.

email_notification_to: $WATCHINGUSERNAME_QP <$WATCHINGUSEREMAILADDR>

email_notification_subject:

page $PAGETITLE_QP has been changed by $PAGEEDITOR_QP

email_notification_headers: MIME-Version: 1.0 Content-type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Mailer: MediaWiki Notification Mailer Reply-To:$PAGEEDITORNAMEANDEMAILADDR_QP

Added by the Enotif script: From:WikiAdmin <$WIKIADMINEMAILADDR> OR From:$PAGEEDITORNAMEANDEMAILADDR_QP

email_notification_body: Dear $WATCHINGUSERNAME,

the page $PAGETITLE has been changed on $PAGEEDITDATE by $PAGEEDITOR, see for the current version.

See for all changes since your last visit. see for the next revision after your last visit.

Editor's summary: $PAGESUMMARY $PAGEMINOREDIT Contact the editor: mail wiki

There will be no other notifications in case of further changes unless you visit this page. You could also reset the notification flags for all your watched pages on your watchlist.

Your friendly notification system

-- To change your watchlist settings, visit

Feedback and further assistance: