Skip to content

Commit cdbb7b7

Browse files
committed
minor #13996 [Mailer] Update mailer.rst (ThomasLandauer)
This PR was squashed before being merged into the 4.4 branch. Discussion ---------- [Mailer] Update mailer.rst Adding the word "array" cause I searched for it, and since I didn't find it, opened this (bogus) issue: symfony/symfony#37657 Also added `addCc()` explicitly, since I also searched for this ;-) Commits ------- b51618f [Mailer] Update mailer.rst
2 parents 75194ae + b51618f commit cdbb7b7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mailer.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,13 @@ both strings or address objects::
274274
:class:`Symfony\\Component\\Mailer\\Event\\MessageEvent` event to set the
275275
same ``From`` email to all messages.
276276

277-
Multiple addresses are defined with the ``addXXX()`` methods::
277+
Multiple addresses can be set with ``addTo()``, ``addCc()``, or ``addBcc()``::
278278

279279
$email = (new Email())
280280
->to('foo@example.com')
281281
->addTo('bar@example.com')
282-
->addTo('baz@example.com')
282+
->cc('cc@example.com')
283+
->addCc('cc2@example.com')
283284

284285
// ...
285286
;
@@ -289,7 +290,7 @@ Alternatively, you can pass multiple addresses to each method::
289290
$toAddresses = ['foo@example.com', new Address('bar@example.com')];
290291

291292
$email = (new Email())
292-
->to(...$toAddresses)
293+
->to(...$toAddresses) // use the splat operator if you have an array
293294
->cc('cc1@example.com', 'cc2@example.com')
294295

295296
// ...

0 commit comments

Comments
 (0)