]> Raphaƫl G. Git Repositories - userbundle/blobdiff - Controller/DefaultController.php
Switch from Mime\NamedAddress to Mime\Address as it do not exists anymore in symfony 4.4
[userbundle] / Controller / DefaultController.php
index 9f2e2b5700765236c555dd4a6e6fe5bd02286d06..29213112f028a3fcbb315dd23c1f499c88bf7de4 100644 (file)
@@ -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\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;
 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
                                        //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
                                                //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'])
 
                                                //Set subject
                                                ->subject($mail['subject'])
 
@@ -299,10 +299,10 @@ class DefaultController extends AbstractController {
                                        //Create message
                                        $message = (new TemplatedEmail())
                                                //Set sender
                                        //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
                                                //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'])
 
                                                //Set subject
                                                ->subject($mail['subject'])
 
@@ -395,10 +395,10 @@ class DefaultController extends AbstractController {
                                //Create message
                                $message = (new TemplatedEmail())
                                        //Set sender
                                //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
                                        //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'])
 
                                        //Set subject
                                        ->subject($mail['subject'])