Skip to content

Remove Address's argument #12484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions mailer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,13 @@ both strings or address objects::
// email address as an object
->from(new Address('fabien@example.com'))

// email address as an object (email clients will display the name
// instead of the email address)
->from(new NamedAddress('fabien@example.com', 'Fabien'))
// defining the email address and name as an object
// (email clients will display the name)
->from(new Address('fabien@example.com'))

// defining the email address and name as a string
// (the format must match: 'Name <email@example.com>')
->from(Address::fromString('Fabien Potencier <fabien@example.com>'))

// ...
;
Expand Down Expand Up @@ -283,7 +287,7 @@ for Twig templates::

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

// path of the Twig template to render
Expand Down