49 lines
1 KiB
PHP
49 lines
1 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Mail;
|
||
|
|
|
||
|
|
use Illuminate\Bus\Queueable;
|
||
|
|
use Illuminate\Mail\Mailable;
|
||
|
|
use Illuminate\Queue\SerializesModels;
|
||
|
|
|
||
|
|
class TenantDeleted extends Mailable
|
||
|
|
{
|
||
|
|
use Queueable;
|
||
|
|
use SerializesModels;
|
||
|
|
|
||
|
|
/** @var string $author */
|
||
|
|
private $author;
|
||
|
|
|
||
|
|
/** @var string $name */
|
||
|
|
private $name;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Create a new message instance.
|
||
|
|
*
|
||
|
|
* @param string $author
|
||
|
|
* @param string $name
|
||
|
|
* @return void
|
||
|
|
*/
|
||
|
|
public function __construct(string $author, string $name)
|
||
|
|
{
|
||
|
|
$this->author = $author;
|
||
|
|
$this->name = $name;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Build the message.
|
||
|
|
*
|
||
|
|
* @return mixed
|
||
|
|
*/
|
||
|
|
public function build(): mixed
|
||
|
|
{
|
||
|
|
return $this
|
||
|
|
->from(config('mail.from.address'), config('mail.from.name'))
|
||
|
|
->subject(sprintf('Suppression du tenant %s', $this->name))
|
||
|
|
->markdown('bo.mails.tenant-deleted', [
|
||
|
|
'author' => $this->author,
|
||
|
|
'name' => $this->name,
|
||
|
|
]);
|
||
|
|
}
|
||
|
|
}
|