ussd_client = $client; } /** * Execute the job. * * @return void */ public function handle(Mailer $mailer) { $client = $this->ussd_client; $emails = ['jim@click-mobile.com', 'priscilla@click-mobile.com','samuel@click-mobile.com']; $name = ucwords($client->name); $status = $client->status; $data = [ 'email' => strtolower($client->email), 'name' => $name, 'status' => $status ]; $mailer->send('emails.new_ussd_client', $data, function ($message) use ($data, $emails) { $message->from('alerts@click-mobile.com', 'Click Mobile ERP'); $message->to($emails)->subject('New USSD Client Details'); }); /* $emails = ['myoneemail@esomething.com', 'myother@esomething.com','myother2@esomething.com']; Mail::send('emails.welcome', [], function($message) use ($emails) { $message->to($emails)->subject('This is test e-mail'); }); */ } }