diff --git a/app/DataMapper/Analytics/EmailSuccess.php b/app/DataMapper/Analytics/EmailSuccess.php index b92b0f2fa2..9ee0e314ef 100644 --- a/app/DataMapper/Analytics/EmailSuccess.php +++ b/app/DataMapper/Analytics/EmailSuccess.php @@ -76,9 +76,10 @@ class EmailSuccess extends GenericMixedMetric */ public $string_metric8 = ''; - public function __construct($string_metric7 = '', $string_metric8 = '') + public function __construct($string_metric7 = '', $string_metric8 = '', string $string_metric9 = '') { $this->string_metric7 = $string_metric7; $this->string_metric8 = $string_metric8; + $this->string_metric9 = $string_metric9; } } diff --git a/app/Jobs/Mail/NinjaMailerJob.php b/app/Jobs/Mail/NinjaMailerJob.php index 1768f7398d..e561517014 100644 --- a/app/Jobs/Mail/NinjaMailerJob.php +++ b/app/Jobs/Mail/NinjaMailerJob.php @@ -153,7 +153,7 @@ class NinjaMailerJob implements ShouldQueue $this->incrementEmailCounter(); - LightLogs::create(new EmailSuccess($this->nmo->company->company_key, $this->nmo->mailable->subject)) + LightLogs::create(new EmailSuccess($this->nmo->company->company_key, $this->nmo->mailable->subject, $this->nmo->mailable->viewData['text_body'] ?? '')) ->send(); } catch (\Symfony\Component\Mailer\Exception\TransportException $e) { diff --git a/app/Services/Email/Email.php b/app/Services/Email/Email.php index 068c5e1803..237443bdd0 100644 --- a/app/Services/Email/Email.php +++ b/app/Services/Email/Email.php @@ -289,7 +289,7 @@ class Email implements ShouldQueue $this->incrementEmailCounter(); - LightLogs::create(new EmailSuccess($this->company->company_key, $this->mailable->subject)) + LightLogs::create(new EmailSuccess($this->company->company_key, $this->mailable->subject, $this->mailable->viewData['text_body'] ?? '')) ->send(); } catch (\Symfony\Component\Mailer\Exception\TransportException $e) {