eveMail = $mail; } /** * Execute the job. * Utilized by using SendEveMail::dispatch($mail); * The model is passed into the dispatch function, then added to the queue * for processing. * * @return void */ public function handle() { //Access the model in the queue for processing $mail = $this->eveMail; //Create a new Mail class variable $esi = new Mail(); //Process the mail from the model to send a new mail $esi->SendGeneralMail($mail->recepient, $mail->subject, $mail->body); } /** * Determine the time the job should timeout * * @return \DateTime */ public function retryUntil() { return now()->addSeconds(5); } /** * The job failed to process. * * @param Exception $exception * @return void */ public function failed(Exception $exception) { // Send user notification of failure, etc... } }