mailable = $mailable; $this->company = $company; $this->to_user = $to_user; $this->sending_method = $sending_method; } public function handle() { MultiDB::setDb($this->company->db); //if we need to set an email driver do it now $this->setMailDriver($sending_method); //send email Mail::to($this->to_user->email) ->send($this->mailable); //catch errors if (count(Mail::failures()) > 0) { $this->logMailError(Mail::failures(), $this->to_user); } } }