diff --git a/includes/EmailBatch.php b/includes/EmailBatch.php index 36073320e..a617fe7db 100644 --- a/includes/EmailBatch.php +++ b/includes/EmailBatch.php @@ -249,7 +249,7 @@ class MWEchoEmailBatch { * Send the batch email */ public function sendEmail() { - global $wgPasswordSender, $wgNotificationReplyName; + global $wgPasswordSender, $wgNoReplyAddress, $wgNotificationReplyName; if ( $this->mUser->getOption( 'echo-email-frequency' ) == EchoEmailFrequency::WEEKLY_DIGEST ) { $frequency = 'weekly'; @@ -283,7 +283,7 @@ class MWEchoEmailBatch { $toAddress = MailAddress::newFromUser( $this->mUser ); $fromAddress = new MailAddress( $wgPasswordSender, wfMessage( 'emailsender' )->inContentLanguage()->text() ); - $replyTo = new MailAddress( $wgPasswordSender, $wgNotificationReplyName ); + $replyTo = new MailAddress( $wgNoReplyAddress, $wgNotificationReplyName ); // @Todo Push the email to job queue or just send it out directly? UserMailer::send( $toAddress, $fromAddress, $content['subject'], $content['body'], [ 'replyTo' => $replyTo ] ); diff --git a/includes/Notifier.php b/includes/Notifier.php index d6c839341..6886cb46a 100644 --- a/includes/Notifier.php +++ b/includes/Notifier.php @@ -55,7 +55,7 @@ class EchoNotifier { $userEmailNotifications = $attributeManager->getUserEnabledEvents( $user, 'email' ); // See if the user wants to receive emails for this category or the user is eligible to receive this email if ( in_array( $event->getType(), $userEmailNotifications ) ) { - global $wgEchoEnableEmailBatch, $wgEchoNotifications, $wgPasswordSender, $wgNotificationReplyName; + global $wgEchoEnableEmailBatch, $wgEchoNotifications, $wgPasswordSender, $wgNoReplyAddress, $wgNotificationReplyName; $priority = $attributeManager->getNotificationPriority( $event->getType() ); @@ -90,7 +90,7 @@ class EchoNotifier { // instant email notification $toAddress = MailAddress::newFromUser( $user ); $fromAddress = new MailAddress( $wgPasswordSender, wfMessage( 'emailsender' )->inContentLanguage()->text() ); - $replyAddress = new MailAddress( $wgPasswordSender, $wgNotificationReplyName ); + $replyAddress = new MailAddress( $wgNoReplyAddress, $wgNotificationReplyName ); // Since we are sending a single email, should set the bundle hash to null // if it is set with a value from somewhere else $event->setBundleHash( null );