Use MailAddress::newFromUser()

Change-Id: I7c6ce9aade27dae66732274979d8baa9eeb0b17c
This commit is contained in:
Kunal Mehta 2014-09-21 18:25:14 -07:00
parent 3cd4e6bbd9
commit d196cbf94e
3 changed files with 3 additions and 3 deletions

View file

@ -86,7 +86,7 @@ class EchoNotifier {
// send single notification if the email wasn't added to queue for bundling
if ( !$addedToQueue ) {
// instant email notification
$toAddress = new MailAddress( $user );
$toAddress = MailAddress::newFromUser( $user );
$fromAddress = new MailAddress( $wgNotificationSender, EchoHooks::getNotificationSenderName() );
$replyAddress = new MailAddress( $wgNotificationSender, $wgNotificationReplyName );
// Since we are sending a single email, should set the bundle hash to null

View file

@ -217,7 +217,7 @@ abstract class MWEchoEmailBatch {
->inLanguage( $this->mUser->getOption( 'language' ) )
->params( $count, $this->count )->text();
$toAddress = new MailAddress( $this->mUser );
$toAddress = MailAddress::newFromUser( $this->mUser );
$fromAddress = new MailAddress( $wgNotificationSender, EchoHooks::getNotificationSenderName() );
$replyAddress = new MailAddress( $wgNotificationSender, $wgNotificationReplyName );

View file

@ -243,7 +243,7 @@ abstract class MWEchoEmailBundler {
global $wgNotificationSender, $wgNotificationReplyName;
$toAddress = new MailAddress( $this->mUser );
$toAddress = MailAddress::newFromUser( $this->mUser );
$fromAddress = new MailAddress( $wgNotificationSender, EchoHooks::getNotificationSenderName() );
$replyAddress = new MailAddress( $wgNotificationSender, $wgNotificationReplyName );