Minor updates for mailer
This commit is contained in:
parent
4d6cf43a1e
commit
7b51db035f
|
|
@ -20,6 +20,7 @@ use App\Utils\Ninja;
|
||||||
use App\Utils\Traits\MakesHash;
|
use App\Utils\Traits\MakesHash;
|
||||||
use GuzzleHttp\Exception\ClientException;
|
use GuzzleHttp\Exception\ClientException;
|
||||||
use Illuminate\Bus\Queueable;
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Contracts\Mail\Mailer;
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
use Illuminate\Foundation\Bus\Dispatchable;
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
use Illuminate\Mail\Mailable;
|
use Illuminate\Mail\Mailable;
|
||||||
|
|
@ -37,7 +38,7 @@ class MailEntity implements ShouldQueue
|
||||||
|
|
||||||
public Mailable $mailable;
|
public Mailable $mailable;
|
||||||
|
|
||||||
public Mail $mail;
|
public Mailer $mail;
|
||||||
|
|
||||||
public ?string $client_postmark_secret = null;
|
public ?string $client_postmark_secret = null;
|
||||||
|
|
||||||
|
|
@ -207,8 +208,8 @@ class MailEntity implements ShouldQueue
|
||||||
public function trySending(): void
|
public function trySending(): void
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$mail = Mail::mailer($this->mailer);
|
|
||||||
$mail->send($this->mailable);
|
$this->mail->send($this->mailable);
|
||||||
|
|
||||||
/* Count the amount of emails sent across all the users accounts */
|
/* Count the amount of emails sent across all the users accounts */
|
||||||
Cache::increment($this->company->account->key);
|
Cache::increment($this->company->account->key);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue