diff --git a/Listener/Notifier.php b/Listener/Notifier.php index cb7f325..1538726 100644 --- a/Listener/Notifier.php +++ b/Listener/Notifier.php @@ -351,7 +351,7 @@ public function createMailAndSend($exception, Request $request = null, $context $subject = substr($subject, 0, 255); } - $mail = \Swift_Message::newInstance() + $mail = (new \Swift_Message()) ->setSubject($subject) ->setFrom($this->from) ->setTo($this->to)