From 98b48559e5eaecf6bddcdec528d6c819363bbb2c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Wed, 27 Nov 2019 17:22:28 +0100 Subject: [PATCH] Switch from Mime\NamedAddress to Mime\Address as it do not exists anymore in symfony 4.4 --- Controller/DefaultController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Controller/DefaultController.php b/Controller/DefaultController.php index a37fc1f..86a280f 100644 --- a/Controller/DefaultController.php +++ b/Controller/DefaultController.php @@ -11,7 +11,7 @@ use Symfony\Component\Form\FormError; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Mailer\Exception\TransportExceptionInterface; use Symfony\Component\Mailer\MailerInterface; -use Symfony\Component\Mime\NamedAddress; +use Symfony\Component\Mime\Address; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Routing\RouterInterface; use Symfony\Component\Translation\TranslatorInterface; @@ -78,10 +78,10 @@ class DefaultController extends AbstractController { //Create message $message = (new TemplatedEmail()) //Set sender - ->from(new NamedAddress($data['mail'], $data['name'])) + ->from(new Address($data['mail'], $data['name'])) //Set recipient //XXX: remove the debug set in vendor/symfony/mime/Address.php +46 - ->to(new NamedAddress($this->config['contact']['mail'], $this->config['contact']['name'])) + ->to(new Address($this->config['contact']['mail'], $this->config['contact']['name'])) //Set subject ->subject($data['subject']) -- 2.41.1