2018-09-15 23:43:22 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Notifications;
|
|
|
|
|
|
|
|
use Pterodactyl\Models\User;
|
2018-09-15 23:59:07 +00:00
|
|
|
use Illuminate\Notifications\Notification;
|
|
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
2018-09-15 23:43:22 +00:00
|
|
|
|
|
|
|
class MailTested extends Notification
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var \Pterodactyl\Models\User
|
|
|
|
*/
|
|
|
|
private $user;
|
|
|
|
|
2018-09-15 23:59:07 +00:00
|
|
|
public function __construct(User $user)
|
|
|
|
{
|
2018-09-15 23:43:22 +00:00
|
|
|
$this->user = $user;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function via()
|
|
|
|
{
|
|
|
|
return ['mail'];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function toMail()
|
|
|
|
{
|
2021-01-23 20:33:34 +00:00
|
|
|
return (new MailMessage())
|
2018-09-15 23:43:22 +00:00
|
|
|
->subject('Pterodactyl Test Message')
|
2021-10-30 20:41:38 +00:00
|
|
|
->greeting('Hello ' . $this->user->name_first . '!')
|
2018-09-15 23:43:22 +00:00
|
|
|
->line('This is a test of the Pterodactyl mail system. You\'re good to go!');
|
|
|
|
}
|
|
|
|
}
|