From 5dcc7b9efd01d0988614aac99f3c4e7685dd450e Mon Sep 17 00:00:00 2001 From: mdpoulter Date: Mon, 27 Jan 2020 14:45:40 +0200 Subject: [PATCH] Add more descriptive subject lines. --- app/Mail/EstimatePdf.php | 5 ++++- app/Mail/PaymentPdf.php | 5 ++++- app/Mail/invoicePdf.php | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/Mail/EstimatePdf.php b/app/Mail/EstimatePdf.php index 42e88ee2..ad32d23b 100644 --- a/app/Mail/EstimatePdf.php +++ b/app/Mail/EstimatePdf.php @@ -32,6 +32,9 @@ class EstimatePdf extends Mailable */ public function build() { - return $this->from($this->notificationEmail)->markdown('emails.send.estimate', ['data', $this->data]); + $company = $this->data['company']['name']; + return $this->from($this->notificationEmail) + ->subject("Estimate from $company") + ->markdown('emails.send.estimate', ['data', $this->data]); } } diff --git a/app/Mail/PaymentPdf.php b/app/Mail/PaymentPdf.php index 72471677..a69174cc 100644 --- a/app/Mail/PaymentPdf.php +++ b/app/Mail/PaymentPdf.php @@ -33,6 +33,9 @@ class PaymentPdf extends Mailable */ public function build() { - return $this->from($this->notificationEmail)->markdown('emails.send.payment', ['data', $this->data]); + $company = $this->data['company']['name']; + return $this->from($this->notificationEmail) + ->subject("Payment from $company") + ->markdown('emails.send.payment', ['data', $this->data]); } } diff --git a/app/Mail/invoicePdf.php b/app/Mail/invoicePdf.php index a7a4e5a9..fb9f43ca 100644 --- a/app/Mail/invoicePdf.php +++ b/app/Mail/invoicePdf.php @@ -32,6 +32,9 @@ class invoicePdf extends Mailable */ public function build() { - return $this->from($this->notificationEmail)->markdown('emails.send.invoice', ['data', $this->data]); + $company = $this->data['company']['name']; + return $this->from($this->notificationEmail) + ->subject("Invoice from $company") + ->markdown('emails.send.invoice', ['data', $this->data]); } }