Enabled email test command
This commit is contained in:
48
app/Mail/TestEmail.php
Normal file
48
app/Mail/TestEmail.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
use App\Classes\Protocol;
|
||||
use App\Models\{Setup,User};
|
||||
|
||||
class TestEmail extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
/* User to send mail to */
|
||||
public User $user;
|
||||
/* Our setup object */
|
||||
public Setup $setup;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(User $o)
|
||||
{
|
||||
$this->user = $o;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$this->setup = Setup::findOrFail(config('app.id'));
|
||||
|
||||
return $this
|
||||
->markdown('mail.system.test_email')
|
||||
->subject('Just a test...')
|
||||
->with([
|
||||
'url'=>'https://localhost',
|
||||
]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user