From b51618ff97b9aab131f0f3bb80463349d1ee3b58 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Fri, 24 Jul 2020 17:03:38 +0200 Subject: [PATCH] [Mailer] Update mailer.rst --- mailer.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mailer.rst b/mailer.rst index 97a3dca00d7..31039f91ec0 100644 --- a/mailer.rst +++ b/mailer.rst @@ -163,12 +163,13 @@ both strings or address objects:: :class:`Symfony\\Component\\Mailer\\Event\\MessageEvent` event to set the same ``From`` email to all messages. -Multiple addresses are defined with the ``addXXX()`` methods:: +Multiple addresses can be set with ``addTo()``, ``addCc()``, or ``addBcc()``:: $email = (new Email()) ->to('foo@example.com') ->addTo('bar@example.com') - ->addTo('baz@example.com') + ->cc('cc@example.com') + ->addCc('cc2@example.com') // ... ; @@ -178,7 +179,7 @@ Alternatively, you can pass multiple addresses to each method:: $toAddresses = ['foo@example.com', new Address('bar@example.com')]; $email = (new Email()) - ->to(...$toAddresses) + ->to(...$toAddresses) // use the splat operator if you have an array ->cc('cc1@example.com', 'cc2@example.com') // ...