File tree 1 file changed +4
-3
lines changed
Filter options
1 file changed +4
-3
lines changed
Original file line number Diff line number Diff line change @@ -163,12 +163,13 @@ both strings or address objects::
163
163
:class: `Symfony\\ Component\\ Mailer\\ Event\\ MessageEvent ` event to set the
164
164
same ``From `` email to all messages.
165
165
166
- Multiple addresses are defined with the ``addXXX () `` methods ::
166
+ Multiple addresses can be set with `` addTo() ``, ``addCc () ``, or `` addBcc() `` ::
167
167
168
168
$email = (new Email())
169
169
->to('foo@example.com')
170
170
->addTo('bar@example.com')
171
- ->addTo('baz@example.com')
171
+ ->cc('cc@example.com')
172
+ ->addCc('cc2@example.com')
172
173
173
174
// ...
174
175
;
@@ -178,7 +179,7 @@ Alternatively, you can pass multiple addresses to each method::
178
179
$toAddresses = ['foo@example.com', new Address('bar@example.com')];
179
180
180
181
$email = (new Email())
181
- ->to(...$toAddresses)
182
+ ->to(...$toAddresses) // use the splat operator if you have an array
182
183
->cc('cc1@example.com', 'cc2@example.com')
183
184
184
185
// ...
You can’t perform that action at this time.
0 commit comments