laravel mail::to multiple email code example
Example 1: send multiple mail in laravel
$emails = ['[email protected]', '[email protected]','[email protected]'];
Mail::send('emails.welcome', [], function($message) use ($emails)
{
$message->to($emails)->subject('This is test e-mail');
});
var_dump( Mail:: failures());
exit;
Example 2: laravel mail to specific email
$to = [
[
'email' => $email,
'name' => $name,
]
];
\Mail::to($to)->send(new \App\Mail\Hello);