Skip to content

Commit 36960eb

Browse files
gisostallenbergjaviereguiluz
authored andcommitted
Add docs on Address::fromString
1 parent 581a296 commit 36960eb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

mailer.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,15 @@ Multiple addresses are defined with the ``addXXX()`` methods::
157157
// ...
158158
;
159159

160+
An ``Address`` can be created from a single string::
161+
162+
$email = (new Email())
163+
->from(Address::fromString('Fabien <fabien@example.com>'))
164+
165+
// ...
166+
;
167+
168+
160169
Alternatively, you can pass multiple addresses to each method::
161170

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

0 commit comments

Comments
 (0)