Winter CMS resources and help articles

Simple and to the point. Optimized by the community.

Send mail to admins

0
by xyz.qtc, last modified on September 27th, 2022
$admins = User::whereHas('groups', function($query) {
   $query->where('code', 'owners');
})->get();

foreach ($admins as $admin) {
    Mail::sendTo($admin->email, mailTemplate, $data);
}

Discussion

0 comments

We use cookies to measure the performance of this website. Do you want to accept these cookies?