$arrayEmails = ['someone@mail.com','stranger@mail.com'];
$emailSubject = 'My Subject';
$emailBody = 'Hello, this is my message content.';
Mail::send('emails.normal',
['msg' => $emailBody],
function($message) use ($arrayEmails, $emailSubject) {
$message->to($arrayEmails)
->subject($emailSubject);
}
);
public function index()
{
$data = array('name'=>"vikash Mirdha");
Mail::send('mailview',$data,function($message) {
$message->to('jobs9493@gmail.com');
$message->subject('Welcome Mail');
});
dd('Mail Send Successfully');
Mail::send(['html' => 'admin.email-template.lowstock'], array('totalUsers' => $totalUsers, 'item' => $item,'data' =>$data), function ($message) use ($user_to_mail, $item) {
$message->from('POS@gmail.com', 'POS');
$message->subject('Notification Mail');
foreach ($user_to_mail as $mail) {
$message->to($mail->email);
}
});
}
Mail::raw('Text to e-mail', function ($message) {
//
});