Skip to content
Snippets Groups Projects

Issue #3420372 by drubb, longwave, m.stenta, jurgenhaas: Core Symfony Mailer...

Issue #3420372 by drubb, longwave, m.stenta, jurgenhaas: Core Symfony Mailer...

Issue #3420372 by drubb, longwave, m.stenta, jurgenhaas: Core Symfony Mailer throws error on transport shutdown

Closes #3420372

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
138 139 ->subject($message['subject'])
139 140 ->text($message['body']);
140 141
141 $mailer = $this->getMailer();
142 $mailer->send($email);
142 // Disable logging, it's verbose and throws exceptions
143 // on transport shutdown.
144 // @see https://www.drupal.org/project/drupal/issues/3420372
145 $this->logger = new NullLogger();
146 $this->getMailer()->send($email);
  • znerol @znerol started a thread on the diff
  • 162 166 //
    163 167 // The MessageEvent will likely play an important role in an upcoming mail
    164 168 // API. However, emails handled by this plugin already were processed by
    165 169 // hook_mail and hook_mail_alter. Firing the MessageEvent would leak those
    166 170 // mails into the code path (i.e., event subscribers) of the new API.
    167 171 // Therefore, this plugin deliberately refrains from injecting the event
    168 172 // dispatcher.
    169 173 $factories = Transport::getDefaultFactories(logger: $this->logger);
    • Instead remove the logger argument when constructing the factories:

      Suggested change
      169 $factories = Transport::getDefaultFactories(logger: $this->logger);
      169 $factories = Transport::getDefaultFactories();
      Edited by znerol
    • Please register or sign in to reply
    Please register or sign in to reply
    Loading