Skip to content

Commit 50a67b0

Browse files
committed
[Mailer][Mime] Remove NamedAddress
Fixes #12215
1 parent 8056c09 commit 50a67b0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mailer.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ both strings or address objects::
132132

133133
// ...
134134
use Symfony\Component\Mime\Address;
135-
use Symfony\Component\Mime\NamedAddress;
136135

137136
$email = (new Email())
138137
// email address as a simple string
@@ -143,7 +142,7 @@ both strings or address objects::
143142

144143
// email address as an object (email clients will display the name
145144
// instead of the email address)
146-
->from(new NamedAddress('fabien@example.com', 'Fabien'))
145+
->from(new Address('fabien@example.com', 'Fabien'))
147146

148147
// ...
149148
;
@@ -306,7 +305,7 @@ for Twig templates::
306305

307306
$email = (new TemplatedEmail())
308307
->from('fabien@example.com')
309-
->to(new NamedAddress('ryan@example.com', 'Ryan'))
308+
->to(new Address('ryan@example.com', 'Ryan'))
310309
->subject('Thanks for signing up!')
311310

312311
// path of the Twig template to render

0 commit comments

Comments
 (0)