From 50a67b0dc107a54164d20a4da9ee5322137c98ed Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Wed, 21 Aug 2019 10:35:17 +0200 Subject: [PATCH] [Mailer][Mime] Remove NamedAddress Fixes #12215 --- mailer.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mailer.rst b/mailer.rst index 107a31753b6..24eea58ab23 100644 --- a/mailer.rst +++ b/mailer.rst @@ -132,7 +132,6 @@ both strings or address objects:: // ... use Symfony\Component\Mime\Address; - use Symfony\Component\Mime\NamedAddress; $email = (new Email()) // email address as a simple string @@ -143,7 +142,7 @@ both strings or address objects:: // email address as an object (email clients will display the name // instead of the email address) - ->from(new NamedAddress('fabien@example.com', 'Fabien')) + ->from(new Address('fabien@example.com', 'Fabien')) // ... ; @@ -306,7 +305,7 @@ for Twig templates:: $email = (new TemplatedEmail()) ->from('fabien@example.com') - ->to(new NamedAddress('ryan@example.com', 'Ryan')) + ->to(new Address('ryan@example.com', 'Ryan')) ->subject('Thanks for signing up!') // path of the Twig template to render