Commit d4761e79 authored by IMMACULATE X's avatar IMMACULATE X Committed by Adam Shepherd
Browse files

Issue #3292384 by AdamPS, wells, immaculatexavier: Import of update config causes dummy address

parent 55c9373a
Loading
Loading
Loading
Loading
+3 −2
Changes for modules/symfony_mailer_bc/src/MailerBcConfigOverride.php: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -31,8 +31,9 @@ class MailerBcConfigOverride implements ConfigFactoryOverrideInterface {
    }

    // The notification address is configured using Mailer Policy for
    // UpdateEmailBuilder. Set a dummy value in update.settings so that the
    // update module sends an email.
    // UpdateEmailBuilder. Set a dummy value in update.settings to force the
    // update module to send an email. NB UpdateEmailBuilder ignores the passed
    // 'To' address so the dummy value will never be used.
    if (in_array('update.settings', $names)) {
      $overrides['update.settings']['notification']['emails'] = ['dummy'];
    }
+2 −1
Changes for modules/symfony_mailer_bc/src/Plugin/EmailBuilder/UpdateEmailBuilder.php: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -85,7 +85,8 @@ class UpdateEmailBuilder extends EmailBuilderBase {
  public function import() {
    $mail_notification = implode(',', $this->helper()->config()->get('update.settings')->get('notification.emails'));

    if ($mail_notification) {
    // Ignore the dummy value set by MailerBcConfigOverride.
    if ($mail_notification && ($mail_notification != 'dummy')) {
      $notification_policy = $this->helper()->policyFromAddresses($this->helper()->parseAddress($mail_notification));
      $config['email_to'] = $notification_policy;
      MailerPolicy::import("update.status_notify", $config);