How to send a single email to all administrators, in laravel 5.4?

-4

I need to implement the sending of emails to a certain group of users, such as administrators, editors, reviewers.

Would it be necessary to use a queue for it or something?

Finally, I want to select a certain group of users and send an email to all emails in this group. Is this possible?

I'm using version 5.4 of laravel.

    
asked by anonymous 26.07.2018 / 21:29

1 answer

0

Laravel 5.4

Second the documentation

link

The to method accepts an e-mail address, an instance of user , or a collection of user collection of objects that Mailer will automatically extract the name and email property to define the containers.

The use of queues is recommended to decrease the response time.

I do not advise you to put multiple addresses in one email, some providers reject messages with too many addresses.

Mail::to($request->user())
    ->cc($coleccao_de_users)
    ->bcc($coleccao_de_objectos)
    ->send(new Anuncio($anuncio));
    
26.07.2018 / 21:41