From 51614b48b728457c44c660637c98cf135200d231 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 11 Nov 2023 10:57:46 +1100 Subject: [PATCH] Updates for email send logs --- app/DataMapper/Analytics/EmailSuccess.php | 9 ++++++++- app/Jobs/Mail/NinjaMailerJob.php | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/DataMapper/Analytics/EmailSuccess.php b/app/DataMapper/Analytics/EmailSuccess.php index a84514a68503..eef7f75de361 100644 --- a/app/DataMapper/Analytics/EmailSuccess.php +++ b/app/DataMapper/Analytics/EmailSuccess.php @@ -69,8 +69,15 @@ class EmailSuccess extends GenericMixedMetric */ public $string_metric7 = ''; - public function __construct($string_metric7) + /** + * Subject + * @var string + */ + public $string_metric8 = ''; + + public function __construct($string_metric7 = '', $string_metric8 = '') { $this->string_metric7 = $string_metric7; + $this->string_metric8 = $string_metric8; } } diff --git a/app/Jobs/Mail/NinjaMailerJob.php b/app/Jobs/Mail/NinjaMailerJob.php index a20efd9bf7ac..4ecc5bc456d6 100644 --- a/app/Jobs/Mail/NinjaMailerJob.php +++ b/app/Jobs/Mail/NinjaMailerJob.php @@ -140,7 +140,7 @@ class NinjaMailerJob implements ShouldQueue /* Count the amount of emails sent across all the users accounts */ Cache::increment("email_quota".$this->company->account->key); - LightLogs::create(new EmailSuccess($this->nmo->company->company_key)) + LightLogs::create(new EmailSuccess($this->nmo->company->company_key, $this->nmo->mailable->subject)) ->send(); } catch(\Symfony\Component\Mime\Exception\RfcComplianceException $e) {