|
@@ -242,7 +242,7 @@ class EmailService
|
|
|
$html = (string) view('emails.templates.attachment', compact('params', 'appUrl', 'emailFromName', 'appInternalName', 'stringMappingConfig'));
|
|
|
$plainText = (string) '';
|
|
|
|
|
|
- // $attachment = $this->getAttachmentFromStoragePath($params['attachmentPath'], 'attachment1');
|
|
|
+ $attachment = $this->getAttachmentFromStoragePath($params['attachmentPath'], 'attachment1');
|
|
|
|
|
|
|
|
|
$emailParams = [
|
|
@@ -253,8 +253,8 @@ class EmailService
|
|
|
'contentHtml' => $html,
|
|
|
'contentText' => $plainText,
|
|
|
'entityType' => null,
|
|
|
- 'entityUid' => null
|
|
|
- // 'attachment1' => $attachment
|
|
|
+ 'entityUid' => null,
|
|
|
+ 'attachment1' => $attachment
|
|
|
];
|
|
|
|
|
|
$response = $this->callJava('/api/email/send', $emailParams, null);
|
|
@@ -272,4 +272,29 @@ class EmailService
|
|
|
|
|
|
return null;
|
|
|
}
|
|
|
+
|
|
|
+ public function emailOrderReportReadyAlert(StoreOrder $storeOrder)
|
|
|
+ {
|
|
|
+ $user = $storeOrder->user;
|
|
|
+ if (!$user->getEmail()) return;
|
|
|
+ $appInternalName = $this->appInternalName;
|
|
|
+ $stringMappingConfig = $this->stringMappingConfig;
|
|
|
+ $appUrl = $this->appUrl;
|
|
|
+ $emailFromName = $this->emailFromName;
|
|
|
+ $html = (string) view('emails.templates.email-order-report-ready-alert', compact('storeOrder', 'user', 'appUrl', 'emailFromName', 'appInternalName', 'stringMappingConfig'));
|
|
|
+ $plainText = (string) '';
|
|
|
+
|
|
|
+ $params = [
|
|
|
+ 'fromEmailAddress' => $this->fromEmailAddress,
|
|
|
+ 'fromName' => $this->emailFromName,
|
|
|
+ 'toEmailAddress' => $user->getEmail(),
|
|
|
+ 'subject' => 'Lab Results Report Ready',
|
|
|
+ 'contentHtml' => $html,
|
|
|
+ 'contentText' => $plainText,
|
|
|
+ 'entityType' => 'USER',
|
|
|
+ 'entityUid' => $user->uid,
|
|
|
+ ];
|
|
|
+
|
|
|
+ $response = $this->callJava('/api/email/send', $params, null);
|
|
|
+ }
|
|
|
}
|