Loading modules/symfony_mailer_bc/src/Plugin/EmailBuilder/UpdateEmailBuilder.php +17 −4 Changes for modules/symfony_mailer_bc/src/Plugin/EmailBuilder/UpdateEmailBuilder.php: 17 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -37,10 +37,6 @@ class UpdateEmailBuilder extends EmailBuilderBase { * {@inheritdoc} */ public function build(EmailInterface $email) { if (empty($email->getTo())) { throw new SkipMailException('No update notification address configured.'); } $config = $this->helper()->config(); $notify_all = ($config->get('update.settings')->get('notification.threshold') == 'all'); \Drupal::moduleHandler()->loadInclude('update', 'install'); Loading @@ -66,6 +62,23 @@ class UpdateEmailBuilder extends EmailBuilderBase { } } /** * Skip sending the update email when no 'To' header is configured. * * This check has to be done after * {@see \Drupal\symfony_mailer\EmailInterface::PHASE_BUILD} because * otherwise the 'To' header might not be set yet. * * @throws \Drupal\symfony_mailer\Exception\SkipMailException * * @see \Drupal\symfony_mailer\EmailInterface::PHASE_PRE_RENDER */ public function preRender(EmailInterface $email): void { if (empty($email->getTo())) { throw new SkipMailException('No update notification address configured.'); } } /** * {@inheritdoc} */ Loading Loading
modules/symfony_mailer_bc/src/Plugin/EmailBuilder/UpdateEmailBuilder.php +17 −4 Changes for modules/symfony_mailer_bc/src/Plugin/EmailBuilder/UpdateEmailBuilder.php: 17 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -37,10 +37,6 @@ class UpdateEmailBuilder extends EmailBuilderBase { * {@inheritdoc} */ public function build(EmailInterface $email) { if (empty($email->getTo())) { throw new SkipMailException('No update notification address configured.'); } $config = $this->helper()->config(); $notify_all = ($config->get('update.settings')->get('notification.threshold') == 'all'); \Drupal::moduleHandler()->loadInclude('update', 'install'); Loading @@ -66,6 +62,23 @@ class UpdateEmailBuilder extends EmailBuilderBase { } } /** * Skip sending the update email when no 'To' header is configured. * * This check has to be done after * {@see \Drupal\symfony_mailer\EmailInterface::PHASE_BUILD} because * otherwise the 'To' header might not be set yet. * * @throws \Drupal\symfony_mailer\Exception\SkipMailException * * @see \Drupal\symfony_mailer\EmailInterface::PHASE_PRE_RENDER */ public function preRender(EmailInterface $email): void { if (empty($email->getTo())) { throw new SkipMailException('No update notification address configured.'); } } /** * {@inheritdoc} */ Loading