Reputation: 3835
I have a function that sends an email like this:
Mail::to($email)
->cc($arraywithemails)
->send(new document());
How do I send the email to multiple cc users? I have checked the official documentation but there is no clue there.
Upvotes: 27
Views: 53560
Reputation: 4422
The setAdress() function in Mailable allow you to give an array as argument:
So You should be able to use the function by passing an array as your argument
Mail::to($email)
->cc(['[email protected]','[email protected]'])
->send(new document());
Upvotes: 54
Reputation: 8750
That should work. From the offical Laravel documentation:
Mail::to($request->user())
->cc($moreUsers)
->bcc($evenMoreUsers)
->send(new OrderShipped($order));
Upvotes: 12