diff --git a/app/Jobs/Mail/NinjaMailerJob.php b/app/Jobs/Mail/NinjaMailerJob.php index 1124fec9c8..18e4304943 100644 --- a/app/Jobs/Mail/NinjaMailerJob.php +++ b/app/Jobs/Mail/NinjaMailerJob.php @@ -254,7 +254,7 @@ class NinjaMailerJob implements ShouldQueue private function incrementEmailCounter(): void { - if(in_array($this->mailer, ['default','mailgun','postmark'])) { + if(in_array($this->nmo->settings->email_sending_method, ['default','mailgun','postmark'])) { Cache::increment("email_quota".$this->company->account->key); } diff --git a/app/Services/Email/Email.php b/app/Services/Email/Email.php index 77edc44542..5202a92dbc 100644 --- a/app/Services/Email/Email.php +++ b/app/Services/Email/Email.php @@ -250,7 +250,7 @@ class Email implements ShouldQueue private function incrementEmailCounter(): void { - if(in_array($this->mailer, ['default','mailgun','postmark'])) { + if(in_array($this->email_object->settings->email_sending_method, ['default','mailgun','postmark'])) { Cache::increment("email_quota".$this->company->account->key); } }