I have a function that sends an email as follows:
Mail::to($email) ->cc($arraywithemails) ->send(new document());
How to send an email to multiple cc users? I checked the official documentation, but there is no clue there.
The setAdress () function in Mailable allows you to specify an array as an argument:
Mailable.php
So you should be able to use this function by passing an array as an argument
Mail::to($email) ->cc(['name1@domain.com','name2@domain.com']) ->send(new document());
That should work. From the official Laravel documentation:
Mail::to($request->user()) ->cc($moreUsers) ->bcc($evenMoreUsers) ->send(new OrderShipped($order));
Source: https://habr.com/ru/post/1676263/More articles:C # code exception on startup - c #How to dynamically change a column name when creating a model in an Entity Framework context class - c #How to write a file in html with beauty? - htmlwhy does not an ordered object save the values ββchanged inside the native code? - c #github fixes that the full name is displayed instead of the username - githubGit name change - gitReal-time use of the Firebase database - facebookWhat are buckets in terms of hash functions? - hash-functionReset TabNavigator story with navigation reaction - react-nativeHow to convert qmake to cmake? - qtAll Articles