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.
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(['name1@domain.com','name2@domain.com'])
->send(new document());
That should work. From the offical Laravel documentation:
Mail::to($request->user())
->cc($moreUsers)
->bcc($evenMoreUsers)
->send(new OrderShipped($order));