EmailNotification Class Reference

This module processes the email notifications when the current page is changed. More...

List of all members.

Public Member Functions

 notifyOnPageChange ($editor, $title, $timestamp, $summary, $minorEdit, $oldid=false)
 Send emails corresponding to the user $editor editing the page $title.
 actuallyNotifyOnPageChange ($editor, $title, $timestamp, $summary, $minorEdit, $oldid, $watchers)
 compose ($user)
 Compose a mail to a given user and either queue it for sending, or send it now, depending on settings.
 sendMails ()
 Send any queued mails.
 sendPersonalised ($watchingUser)
 Does the per-user customizations to a notification e-mail (name, timestamp in proper timezone, etc) and sends it out.
 sendImpersonal ($addresses)
 Same as sendPersonalised but does impersonal mail suitable for bulk mailing.

Private Member Functions

 composeCommonMailtext ()

Private Attributes

 $to
 $subject
 $body
 $replyto
 $from
 $user
 $title
 $timestamp
 $summary
 $minorEdit
 $oldid
 $composed_common
 $editor
 $mailTargets = array()


Detailed Description

This module processes the email notifications when the current page is changed.

It looks up the table watchlist to find out which users are watching that page.

The current implementation sends independent emails to each watching user for the following reason:

Suggested improvement to slack down the number of sent emails: We could think of sending out bulk mails (bcc:user1,user2...) for all these users having the same timeoffset in their preferences.

Visit the documentation pages under http://meta.wikipedia.com/Enotif

Definition at line 265 of file UserMailer.php.


Member Function Documentation

EmailNotification::actuallyNotifyOnPageChange ( editor,
title,
timestamp,
summary,
minorEdit,
oldid,
watchers 
)

EmailNotification::compose ( user  ) 

Compose a mail to a given user and either queue it for sending, or send it now, depending on settings.

Call sendMails() to send any mails that were queued.

Definition at line 528 of file UserMailer.php.

References $user, $wgEnotifImpersonal, composeCommonMailtext(), and sendPersonalised().

Referenced by actuallyNotifyOnPageChange().

EmailNotification::composeCommonMailtext (  )  [private]

EmailNotification::notifyOnPageChange ( editor,
title,
timestamp,
summary,
minorEdit,
oldid = false 
)

Send emails corresponding to the user $editor editing the page $title.

Also updates wl_notificationtimestamp.

May be deferred via the job queue.

Parameters:
$editor User object
$title Title object
$timestamp 
$summary 
$minorEdit 
$oldid (default: false)

Definition at line 283 of file UserMailer.php.

References $dbw, $editor, $job, $minorEdit, $oldid, $res, $row, $summary, $timestamp, $title, $wgEnotifUseJobQ, $wgEnotifWatchlist, $wgShowUpdatedMarker, actuallyNotifyOnPageChange(), and wfGetDB().

EmailNotification::sendImpersonal ( addresses  ) 

Same as sendPersonalised but does impersonal mail suitable for bulk mailing.

Takes an array of MailAddress objects.

Definition at line 586 of file UserMailer.php.

References $body, $wgContLang, UserMailer::send(), and wfMsgForContent().

Referenced by sendMails().

EmailNotification::sendMails (  ) 

Send any queued mails.

Definition at line 544 of file UserMailer.php.

References $wgEnotifImpersonal, and sendImpersonal().

Referenced by actuallyNotifyOnPageChange().

EmailNotification::sendPersonalised ( watchingUser  ) 

Does the per-user customizations to a notification e-mail (name, timestamp in proper timezone, etc) and sends it out.

Returns true if the mail was sent successfully.

Parameters:
User $watchingUser
object $mail
Returns:
bool
Access:
private

Definition at line 561 of file UserMailer.php.

References $body, $name, $to, $wgContLang, $wgEnotifUseRealName, and UserMailer::send().

Referenced by compose().


Member Data Documentation

EmailNotification::$body [private]

Definition at line 266 of file UserMailer.php.

Referenced by composeCommonMailtext(), sendImpersonal(), and sendPersonalised().

EmailNotification::$composed_common [private]

Definition at line 267 of file UserMailer.php.

EmailNotification::$editor [private]

EmailNotification::$from [private]

Definition at line 266 of file UserMailer.php.

Referenced by composeCommonMailtext().

EmailNotification::$mailTargets = array() [private]

Definition at line 268 of file UserMailer.php.

EmailNotification::$minorEdit [private]

Definition at line 267 of file UserMailer.php.

Referenced by actuallyNotifyOnPageChange(), and notifyOnPageChange().

EmailNotification::$oldid [private]

Definition at line 267 of file UserMailer.php.

Referenced by actuallyNotifyOnPageChange(), and notifyOnPageChange().

EmailNotification::$replyto [private]

Definition at line 266 of file UserMailer.php.

Referenced by composeCommonMailtext().

EmailNotification::$subject [private]

Definition at line 266 of file UserMailer.php.

Referenced by composeCommonMailtext().

EmailNotification::$summary [private]

EmailNotification::$timestamp [private]

Definition at line 267 of file UserMailer.php.

Referenced by actuallyNotifyOnPageChange(), and notifyOnPageChange().

EmailNotification::$title [private]

Definition at line 267 of file UserMailer.php.

Referenced by actuallyNotifyOnPageChange(), and notifyOnPageChange().

EmailNotification::$to [private]

Definition at line 266 of file UserMailer.php.

Referenced by sendPersonalised().

EmailNotification::$user [private]

Definition at line 267 of file UserMailer.php.

Referenced by actuallyNotifyOnPageChange(), and compose().


The documentation for this class was generated from the following file:

Generated on Sat Sep 5 02:08:36 2009 for MediaWiki by  doxygen 1.5.9