misc_pterodactyl-panel/app/Notifications/MailTested.php

34 lines
707 B
PHP
Raw Normal View History

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()
{
return (new MailMessage)
->subject('Pterodactyl Test Message')
->greeting('Hello ' . $this->user->name . '!')
->line('This is a test of the Pterodactyl mail system. You\'re good to go!');
}
}