mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 18:34:28 -04:00
Move attachments into data
This commit is contained in:
parent
3e04be5d1d
commit
66e4270531
@ -138,11 +138,11 @@ class InvoiceEmailEngine extends BaseEmailEngine
|
||||
|
||||
// Storage::url
|
||||
foreach ($this->invoice->documents as $document) {
|
||||
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, ]]);
|
||||
$this->setAttachments([['file' => base64_encode($document->getFile()), 'path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, ]]);
|
||||
}
|
||||
|
||||
foreach ($this->invoice->company->documents as $document) {
|
||||
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, ]]);
|
||||
$this->setAttachments([['file' => base64_encode($document->getFile()), 'path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, ]]);
|
||||
}
|
||||
|
||||
$line_items = $this->invoice->line_items;
|
||||
|
@ -118,10 +118,7 @@ class TemplateEmail extends Mailable
|
||||
'logo' => $this->company->present()->logo($settings),
|
||||
]);
|
||||
|
||||
nlog($this->build_email->getAttachments());
|
||||
|
||||
|
||||
foreach (array_reverse($this->build_email->getAttachments()) as $file) {
|
||||
foreach ($this->build_email->getAttachments() as $file) {
|
||||
if(array_key_exists('file', $file))
|
||||
$this->attachData(base64_decode($file['file']), $file['name']);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user