mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 01:04:43 -04:00
Inject slight delay into emails
This commit is contained in:
parent
778c30f7ed
commit
93c96e0d78
@ -141,7 +141,7 @@ class EmailController extends BaseController
|
|||||||
if (! $invitation->contact->trashed() && $invitation->contact->email) {
|
if (! $invitation->contact->trashed() && $invitation->contact->email) {
|
||||||
$entity_obj->service()->markSent()->save();
|
$entity_obj->service()->markSent()->save();
|
||||||
|
|
||||||
EmailEntity::dispatch($invitation->fresh(), $invitation->company, $template, $data);
|
EmailEntity::dispatch($invitation->fresh(), $invitation->company, $template, $data)->delay(now()->addSeconds(2));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -194,7 +194,7 @@ class EmailController extends BaseController
|
|||||||
|
|
||||||
$data['template'] = $template;
|
$data['template'] = $template;
|
||||||
|
|
||||||
PurchaseOrderEmail::dispatch($entity_obj, $entity_obj->company, $data);
|
PurchaseOrderEmail::dispatch($entity_obj, $entity_obj->company, $data)->delay(now()->addSeconds(2));
|
||||||
|
|
||||||
return $this->itemResponse($entity_obj);
|
return $this->itemResponse($entity_obj);
|
||||||
|
|
||||||
|
@ -143,11 +143,11 @@ class InvoiceEmailEngine extends BaseEmailEngine
|
|||||||
|
|
||||||
// Storage::url
|
// Storage::url
|
||||||
foreach ($this->invoice->documents as $document) {
|
foreach ($this->invoice->documents as $document) {
|
||||||
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, 'file' => $document->getFile()]]);
|
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, 'file' => base64_encode($document->getFile())]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->invoice->company->documents as $document) {
|
foreach ($this->invoice->company->documents as $document) {
|
||||||
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, 'file' => $document->getFile()]]);
|
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, 'file' => base64_encode($document->getFile())]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$line_items = $this->invoice->line_items;
|
$line_items = $this->invoice->line_items;
|
||||||
@ -165,7 +165,7 @@ class InvoiceEmailEngine extends BaseEmailEngine
|
|||||||
->cursor()
|
->cursor()
|
||||||
->each(function ($expense) {
|
->each(function ($expense) {
|
||||||
foreach ($expense->documents as $document) {
|
foreach ($expense->documents as $document) {
|
||||||
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, 'file' => $document->getFile()]]);
|
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, 'file' => base64_encode($document->getFile())]]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -181,7 +181,7 @@ class InvoiceEmailEngine extends BaseEmailEngine
|
|||||||
->cursor()
|
->cursor()
|
||||||
->each(function ($task) {
|
->each(function ($task) {
|
||||||
foreach ($task->documents as $document) {
|
foreach ($task->documents as $document) {
|
||||||
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, 'file' => $document->getFile()]]);
|
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, 'file' => base64_encode($document->getFile())]]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user