2018-09-15 19:43:22 -04:00
|
|
|
<?php
|
|
|
|
|
|
2026-10-05 18:10:18 -04:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2018-09-15 19:43:22 -04:00
|
|
|
namespace Pterodactyl\Notifications;
|
|
|
|
|
|
2018-09-15 19:59:07 -04:00
|
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
2026-10-05 18:10:18 -04:00
|
|
|
use Illuminate\Notifications\Notification;
|
|
|
|
|
use Pterodactyl\Models\User;
|
2018-09-15 19:43:22 -04:00
|
|
|
|
|
|
|
|
class MailTested extends Notification
|
|
|
|
|
{
|
2026-10-05 18:10:18 -04:00
|
|
|
public function __construct(private readonly User $user) {}
|
2018-09-15 19:43:22 -04:00
|
|
|
|
2026-10-05 18:10:18 -04:00
|
|
|
/**
|
|
|
|
|
* @return list<string>
|
|
|
|
|
*/
|
2022-10-14 10:59:20 -06:00
|
|
|
public function via(): array
|
2018-09-15 19:43:22 -04:00
|
|
|
{
|
|
|
|
|
return ['mail'];
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-14 10:59:20 -06:00
|
|
|
public function toMail(): MailMessage
|
2018-09-15 19:43:22 -04:00
|
|
|
{
|
2026-10-05 18:10:18 -04:00
|
|
|
return (new MailMessage)
|
2018-09-15 19:43:22 -04:00
|
|
|
->subject('Pterodactyl Test Message')
|
2026-10-05 18:10:18 -04:00
|
|
|
->greeting('Hello '.$this->user->name.'!')
|
|
|
|
|
->line("This is a test of the Pterodactyl mail system. You're good to go!");
|
2018-09-15 19:43:22 -04:00
|
|
|
}
|
|
|
|
|
}
|