user = $user; $this->sendTo = $sendTo; $this->settings = Setting::first(); $this->template = $template; } public function handle() { Mail::to($this->sendTo)->send( new \App\Mail\SendEmail($this->user, $this->settings, $this->template) ); if (config('queue.default') == 'sync') { sleep(rand(1, 4)); } } }