quote = $quote; $this->reminder_template = $reminder_template; $this->contact = $contact; } /** * Builds the correct template to send. * @return void */ public function run() { if (! $this->reminder_template) { $this->reminder_template = $this->quote->calculateTemplate('quote'); } $this->quote->invitations->each(function ($invitation) { if (!$invitation->contact->trashed() && $invitation->contact->send_email && $invitation->contact->email) { EmailEntity::dispatchNow($invitation, $invitation->company, $this->reminder_template); } }); $this->quote->service()->markSent(); } }