mirror of
https://github.com/crater-invoice/crater.git
synced 2025-12-15 09:52:55 -05:00
feat(emails): implemented sending invoice, estimates and payments as attachements
This commit is contained in:
@@ -379,9 +379,9 @@ class Estimate extends Model implements HasMedia
|
||||
$data['user'] = $this->user->toArray();
|
||||
$data['company'] = $this->company->toArray();
|
||||
$data['body'] = $this->getEmailBody($data['body']);
|
||||
$pdfData = ($this->getEmailAttachmentSetting()) ? $this->getPDFData() : null;
|
||||
$data['attach']['data'] = ($this->getEmailAttachmentSetting()) ? $this->getPDFData() : null;
|
||||
|
||||
\Mail::to($data['to'])->send(new SendEstimateMail($data, $pdfData));
|
||||
\Mail::to($data['to'])->send(new SendEstimateMail($data));
|
||||
|
||||
if ($this->status == Estimate::STATUS_DRAFT) {
|
||||
$this->status = Estimate::STATUS_SENT;
|
||||
|
||||
Reference in New Issue
Block a user