the accepted answer does not work any longer with laravel 5.3 because mailable tries to access ->email
and results in
ErrorException in Mailable.php line 376: Trying to get property of non-object
a working code for laravel 5.3 is this:
$users_temp = explode(',', '[email protected],[email protected]');
$users = [];
foreach($users_temp as $key => $ut){
$ua = [];
$ua['email'] = $ut;
$ua['name'] = 'test';
$users[$key] = (object)$ua;
}
Mail::to($users)->send(new OrderAdminSendInvoice($o));