diff --git a/app/Mail/Admin/ClientUnsubscribedObject.php b/app/Mail/Admin/ClientUnsubscribedObject.php new file mode 100644 index 000000000000..e884840acb82 --- /dev/null +++ b/app/Mail/Admin/ClientUnsubscribedObject.php @@ -0,0 +1,55 @@ +company->getLocale()); + /* Set customized translations _NOW_ */ + $t->replace(Ninja::transformTranslations($this->company->settings)); + + $data = [ + 'title' => ctrans('texts.client_unsubscribed'), + 'message' => ctrans('texts.client_unsubscribed_help', ['client' => $this->contact->present()->name()]), + 'url' => $this->contact->client->portalUrl(false), + 'button' => ctrans('texts.view_client'), + 'signature' => $this->company->settings->email_signature, + 'settings' => $this->company->settings, + 'logo' => $this->company->present()->logo(), + ]; + + $mail_obj = new \stdClass(); + $mail_obj->subject = ctrans('texts.client_unsubscribed'); + $mail_obj->data = $data; + $mail_obj->markdown = 'email.admin.generic'; + $mail_obj->tag = $this->company->company_key; + + return $mail_obj; + } +}