I can\'t seem to successfully send to multiple addresses when using Laravel\'s Mail::send() callback, the code does however work when I only sp
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(',', 'first@example.com,second@example.com');
$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));