From 36960eb4f0194b981fcf62f14d77f9df8ebde179 Mon Sep 17 00:00:00 2001 From: Giso Stallenberg Date: Fri, 9 Aug 2019 13:47:18 +0200 Subject: [PATCH] Add docs on Address::fromString --- mailer.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mailer.rst b/mailer.rst index 24eea58ab23..4567b4ac0dc 100644 --- a/mailer.rst +++ b/mailer.rst @@ -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 ')) + + // ... + ; + + Alternatively, you can pass multiple addresses to each method:: $toAddresses = ['foo@example.com', new Address('bar@example.com')];