Skip to content

Commit

Permalink
Add docs on Address::fromString
Browse files Browse the repository at this point in the history
  • Loading branch information
gisostallenberg authored and javiereguiluz committed Sep 2, 2019
1 parent 581a296 commit 36960eb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mailer.rst
Expand Up @@ -157,6 +157,15 @@ Multiple addresses are defined with the ``addXXX()`` methods::
// ...
;

An ``Address`` can be created from a single string::

$email = (new Email())
->from(Address::fromString('Fabien <fabien@example.com>'))

// ...
;


Alternatively, you can pass multiple addresses to each method::

$toAddresses = ['foo@example.com', new Address('bar@example.com')];
Expand Down

0 comments on commit 36960eb

Please sign in to comment.