mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 23:01:29 +00:00
58 lines
1.1 KiB
PHP
58 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Mail;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class SendInvite extends Mailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
/**
|
|
* @var User
|
|
*/
|
|
public $user;
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
public $invite;
|
|
|
|
/**
|
|
* @var mixed
|
|
*/
|
|
private $siteEmail;
|
|
|
|
/**
|
|
* @var mixed
|
|
*/
|
|
private $siteTitle;
|
|
|
|
/**
|
|
* SendInvite constructor.
|
|
*/
|
|
public function __construct(User $user, mixed $invite)
|
|
{
|
|
$this->user = $user;
|
|
$this->invite = $invite;
|
|
$this->siteEmail = config('mail.from.address');
|
|
$this->siteTitle = config('app.name');
|
|
}
|
|
|
|
/**
|
|
* Build the message.
|
|
*
|
|
*
|
|
* @throws \Exception
|
|
*/
|
|
public function build(): static
|
|
{
|
|
return $this->from($this->siteEmail)->subject('Invite received')->view('emails.sendinvite')->with(['invite' => $this->invite, 'username' => $this->user['username'], 'site' => $this->siteTitle, 'email' => $this->user['email']]);
|
|
}
|
|
}
|