mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01: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) {
|
||||
$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;
|
||||
|
||||
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);
|
||||
|
||||
|
@ -143,11 +143,11 @@ class InvoiceEmailEngine extends BaseEmailEngine
|
||||
|
||||
// Storage::url
|
||||
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) {
|
||||
$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;
|
||||
@ -165,7 +165,7 @@ class InvoiceEmailEngine extends BaseEmailEngine
|
||||
->cursor()
|
||||
->each(function ($expense) {
|
||||
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()
|
||||
->each(function ($task) {
|
||||
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…
Reference in New Issue
Block a user