71 lines
1.4 KiB
PHP
71 lines
1.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Mail;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Mail\Mailables\Content;
|
|
use Illuminate\Mail\Mailables\Envelope;
|
|
use Illuminate\Support\Facades\Config;
|
|
|
|
// NOTE: This may be be queued
|
|
class CustomerPasswordHasReset extends Mailable implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
/** 'failed_jobs' after */
|
|
public int $tries = 5;
|
|
|
|
/**
|
|
* Attempts delays
|
|
*
|
|
* @return array<int, int>
|
|
*/
|
|
public function backoff(): array
|
|
{
|
|
return [10, 30, 60, 300];
|
|
}
|
|
|
|
private string $siteName;
|
|
|
|
/**
|
|
* Create a new message instance.
|
|
*/
|
|
public function __construct()
|
|
{
|
|
$this->siteName = Config::string('app.name');
|
|
}
|
|
|
|
/**
|
|
* Get the message envelope.
|
|
*/
|
|
public function envelope(): Envelope
|
|
{
|
|
return new Envelope(
|
|
subject: trans('Your password has been changed - :appname', ['appname' => $this->siteName]),
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get the message content definition.
|
|
*/
|
|
public function content(): Content
|
|
{
|
|
return new Content(
|
|
markdown: 'emails.password-has-reset',
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get the attachments for the message.
|
|
*
|
|
* @return \Illuminate\Mail\Mailables\Attachment[]
|
|
*/
|
|
public function attachments(): array
|
|
{
|
|
return [];
|
|
}
|
|
}
|