Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b51618f

Browse filesBrowse files
ThomasLandauerjaviereguiluz
authored andcommitted
[Mailer] Update mailer.rst
1 parent ef5dd0b commit b51618f
Copy full SHA for b51618f

File tree

1 file changed

+4
-3
lines changed
Filter options

1 file changed

+4
-3
lines changed

‎mailer.rst

Copy file name to clipboardExpand all lines: mailer.rst
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,13 @@ both strings or address objects::
163163
:class:`Symfony\\Component\\Mailer\\Event\\MessageEvent` event to set the
164164
same ``From`` email to all messages.
165165

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

168168
$email = (new Email())
169169
->to('foo@example.com')
170170
->addTo('bar@example.com')
171-
->addTo('baz@example.com')
171+
->cc('cc@example.com')
172+
->addCc('cc2@example.com')
172173

173174
// ...
174175
;
@@ -178,7 +179,7 @@ Alternatively, you can pass multiple addresses to each method::
178179
$toAddresses = ['foo@example.com', new Address('bar@example.com')];
179180

180181
$email = (new Email())
181-
->to(...$toAddresses)
182+
->to(...$toAddresses) // use the splat operator if you have an array
182183
->cc('cc1@example.com', 'cc2@example.com')
183184

184185
// ...

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.