Skip to content

Commit

Permalink
[Mailer][Mime] Remove NamedAddress
Browse files Browse the repository at this point in the history
Fixes #12215
  • Loading branch information
OskarStark committed Aug 22, 2019
1 parent 8056c09 commit 50a67b0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mailer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'))

// ...
;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 50a67b0

Please sign in to comment.