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.

Protected Attributes

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

Private Member Functions

 composeCommonMailtext ()


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 266 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 530 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 284 of file UserMailer.php.

References $dbw, $editor, $job, $minorEdit, $oldid, $res, $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 593 of file UserMailer.php.

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

Referenced by sendMails().

EmailNotification::sendMails (  ) 

Send any queued mails.

Definition at line 546 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 563 of file UserMailer.php.

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

Referenced by compose().


Member Data Documentation

EmailNotification::$body [protected]

Definition at line 267 of file UserMailer.php.

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

EmailNotification::$composed_common [protected]

Definition at line 268 of file UserMailer.php.

EmailNotification::$editor [protected]

EmailNotification::$from [protected]

Definition at line 267 of file UserMailer.php.

Referenced by composeCommonMailtext().

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

Definition at line 269 of file UserMailer.php.

EmailNotification::$minorEdit [protected]

Definition at line 268 of file UserMailer.php.

Referenced by actuallyNotifyOnPageChange(), and notifyOnPageChange().

EmailNotification::$oldid [protected]

Definition at line 268 of file UserMailer.php.

Referenced by actuallyNotifyOnPageChange(), and notifyOnPageChange().

EmailNotification::$replyto [protected]

Definition at line 267 of file UserMailer.php.

Referenced by composeCommonMailtext().

EmailNotification::$subject [protected]

Definition at line 267 of file UserMailer.php.

Referenced by composeCommonMailtext().

EmailNotification::$summary [protected]

EmailNotification::$timestamp [protected]

Definition at line 268 of file UserMailer.php.

Referenced by actuallyNotifyOnPageChange(), and notifyOnPageChange().

EmailNotification::$title [protected]

Definition at line 268 of file UserMailer.php.

Referenced by actuallyNotifyOnPageChange(), and notifyOnPageChange().

EmailNotification::$to [protected]

Definition at line 267 of file UserMailer.php.

Referenced by sendPersonalised().

EmailNotification::$user [protected]

Definition at line 268 of file UserMailer.php.

Referenced by actuallyNotifyOnPageChange(), and compose().


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

Generated on Sat Apr 30 22:57:36 2011 for MediaWiki by  doxygen 1.5.9