From: Raphaƫl Gertz Date: Wed, 27 Nov 2019 16:29:08 +0000 (+0100) Subject: Switch from Mime\NamedAddress to Mime\Address as it do not exists anymore in symfony 4.4 X-Git-Tag: 0.1.2~9 X-Git-Url: https://git.rapsys.eu/userbundle/commitdiff_plain/cd63c23839fe5f0d0959182cfa9e20d0f162cd7b?ds=inline Switch from Mime\NamedAddress to Mime\Address as it do not exists anymore in symfony 4.4 --- diff --git a/Controller/DefaultController.php b/Controller/DefaultController.php index 9f2e2b5..2921311 100644 --- a/Controller/DefaultController.php +++ b/Controller/DefaultController.php @@ -10,7 +10,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\Security\Core\Encoder\UserPasswordEncoderInterface; @@ -164,10 +164,10 @@ class DefaultController extends AbstractController { //Create message $message = (new TemplatedEmail()) //Set sender - ->from(new NamedAddress($this->config['contact']['mail'], $this->config['contact']['name'])) + ->from(new Address($this->config['contact']['mail'], $this->config['contact']['name'])) //Set recipient //XXX: remove the debug set in vendor/symfony/mime/Address.php +46 - ->to(new NamedAddress($mail['context']['recipient_mail'], $mail['context']['recipient_name'])) + ->to(new Address($mail['context']['recipient_mail'], $mail['context']['recipient_name'])) //Set subject ->subject($mail['subject']) @@ -299,10 +299,10 @@ class DefaultController extends AbstractController { //Create message $message = (new TemplatedEmail()) //Set sender - ->from(new NamedAddress($this->config['contact']['mail'], $this->config['contact']['name'])) + ->from(new Address($this->config['contact']['mail'], $this->config['contact']['name'])) //Set recipient //XXX: remove the debug set in vendor/symfony/mime/Address.php +46 - ->to(new NamedAddress($mail['context']['recipient_mail'], $mail['context']['recipient_name'])) + ->to(new Address($mail['context']['recipient_mail'], $mail['context']['recipient_name'])) //Set subject ->subject($mail['subject']) @@ -395,10 +395,10 @@ class DefaultController extends AbstractController { //Create message $message = (new TemplatedEmail()) //Set sender - ->from(new NamedAddress($this->config['contact']['mail'], $this->config['contact']['name'])) + ->from(new Address($this->config['contact']['mail'], $this->config['contact']['name'])) //Set recipient //XXX: remove the debug set in vendor/symfony/mime/Address.php +46 - ->to(new NamedAddress($mail['context']['recipient_mail'], $mail['context']['recipient_name'])) + ->to(new Address($mail['context']['recipient_mail'], $mail['context']['recipient_name'])) //Set subject ->subject($mail['subject'])