add SMTP mail tester
This commit is contained in:
parent
2d469cc951
commit
fd3e5fc73e
5 changed files with 82 additions and 2 deletions
32
app/Notifications/MailTested.php
Normal file
32
app/Notifications/MailTested.php
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Notifications;
|
||||
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Pterodactyl\Models\User;
|
||||
|
||||
class MailTested extends Notification
|
||||
{
|
||||
/**
|
||||
* @var \Pterodactyl\Models\User
|
||||
*/
|
||||
private $user;
|
||||
|
||||
public function __construct(User $user) {
|
||||
$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!');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue