mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 01:30:15 +00:00
Use $wgNoReplyAddress rather than $wgPasswordSender for generic Reply-To
Change-Id: I4712d4fe02caf019a3b45f6efe82453eec59a50f
This commit is contained in:
parent
d2ab6527e9
commit
92b2df6f3e
|
@ -249,7 +249,7 @@ class MWEchoEmailBatch {
|
||||||
* Send the batch email
|
* Send the batch email
|
||||||
*/
|
*/
|
||||||
public function sendEmail() {
|
public function sendEmail() {
|
||||||
global $wgPasswordSender, $wgNotificationReplyName;
|
global $wgPasswordSender, $wgNoReplyAddress, $wgNotificationReplyName;
|
||||||
|
|
||||||
if ( $this->mUser->getOption( 'echo-email-frequency' ) == EchoEmailFrequency::WEEKLY_DIGEST ) {
|
if ( $this->mUser->getOption( 'echo-email-frequency' ) == EchoEmailFrequency::WEEKLY_DIGEST ) {
|
||||||
$frequency = 'weekly';
|
$frequency = 'weekly';
|
||||||
|
@ -283,7 +283,7 @@ class MWEchoEmailBatch {
|
||||||
|
|
||||||
$toAddress = MailAddress::newFromUser( $this->mUser );
|
$toAddress = MailAddress::newFromUser( $this->mUser );
|
||||||
$fromAddress = new MailAddress( $wgPasswordSender, wfMessage( 'emailsender' )->inContentLanguage()->text() );
|
$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?
|
// @Todo Push the email to job queue or just send it out directly?
|
||||||
UserMailer::send( $toAddress, $fromAddress, $content['subject'], $content['body'], [ 'replyTo' => $replyTo ] );
|
UserMailer::send( $toAddress, $fromAddress, $content['subject'], $content['body'], [ 'replyTo' => $replyTo ] );
|
||||||
|
|
|
@ -55,7 +55,7 @@ class EchoNotifier {
|
||||||
$userEmailNotifications = $attributeManager->getUserEnabledEvents( $user, 'email' );
|
$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
|
// 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 ) ) {
|
if ( in_array( $event->getType(), $userEmailNotifications ) ) {
|
||||||
global $wgEchoEnableEmailBatch, $wgEchoNotifications, $wgPasswordSender, $wgNotificationReplyName;
|
global $wgEchoEnableEmailBatch, $wgEchoNotifications, $wgPasswordSender, $wgNoReplyAddress, $wgNotificationReplyName;
|
||||||
|
|
||||||
$priority = $attributeManager->getNotificationPriority( $event->getType() );
|
$priority = $attributeManager->getNotificationPriority( $event->getType() );
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ class EchoNotifier {
|
||||||
// instant email notification
|
// instant email notification
|
||||||
$toAddress = MailAddress::newFromUser( $user );
|
$toAddress = MailAddress::newFromUser( $user );
|
||||||
$fromAddress = new MailAddress( $wgPasswordSender, wfMessage( 'emailsender' )->inContentLanguage()->text() );
|
$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
|
// Since we are sending a single email, should set the bundle hash to null
|
||||||
// if it is set with a value from somewhere else
|
// if it is set with a value from somewhere else
|
||||||
$event->setBundleHash( null );
|
$event->setBundleHash( null );
|
||||||
|
|
Loading…
Reference in a new issue