0

i have to send the bulk emails using bcc but it gives error,i also read somewhere bcc function takes 2 parameters but this also didn't work.var_dump($users) it giving correct output

 public function welcomeEmails()
{ 
        $users = User::select('email')->whereIn('id',[5,6,7]->get()->toArray();  
         Mail::send('emails.welcome_email', [], function($message) use ($users)
         {     
            $message->to(abc@gmail.com)
                    ->bcc('$users')
                    ->subject('Welcome to the jobsee');     
         }); 
            Session::flash('success', 'Your message was sent!'); 
            return redirect()->back();  
}
 

1 Answers1

0

This error is probably due to an invalid email address. This error is usually returned by the server and has nothing to do with Laravel.

Ehsan A. Kian
  • 169
  • 1
  • 3
  • 9