email quality

This commit is contained in:
David Bomba 2022-07-03 10:21:54 +10:00
parent f592af1469
commit 866dd58b03
2 changed files with 9 additions and 4 deletions

View File

@ -33,7 +33,7 @@ class Account extends BaseModel
use PresentableTrait;
use MakesHash;
private $free_plan_email_quota = 100;
private $free_plan_email_quota = 50;
private $paid_plan_email_quota = 500;
/**

View File

@ -11,6 +11,7 @@
namespace App\Notifications\Ninja;
use App\Models\Company;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
@ -29,11 +30,14 @@ class EmailQualityNotification extends Notification
* @return void
*/
protected $company;
protected Company $company;
public function __construct($company)
protected string $spam_string;
public function __construct(Company $company, string $spam_string)
{
$this->company = $company;
$this->spam_string = $spam_string;
}
/**
@ -77,7 +81,8 @@ class EmailQualityNotification extends Notification
$owner = $this->company->owner();
$content .= "Owner {$owner->present()->name() } | {$owner->email}";
$content .= "Owner {$owner->present()->name() } | {$owner->email} \n";
$content .= "Spam trigger: {$this->spam_string}";
return (new SlackMessage)
->success()