Skip to content

Commit

Permalink
minor #12217 [Mailer][Mime] Remove NamedAddress (OskarStark)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer][Mime] Remove NamedAddress

Fixes #12215

<!--

If your pull request fixes a BUG, use the oldest maintained branch that contains
the bug (see https://symfony.com/roadmap for the list of maintained branches).

If your pull request documents a NEW FEATURE, use the same Symfony branch where
the feature was introduced (and `master` for features of unreleased versions).

-->

Commits
-------

50a67b0 [Mailer][Mime] Remove NamedAddress
  • Loading branch information
OskarStark committed Aug 22, 2019
2 parents 8056c09 + 50a67b0 commit 581a296
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 581a296

Please sign in to comment.