ldc-gen-game-web/app/Console/Commands/TestMail.php
2026-10-20 12:27:49 +02:00

37 lines
797 B
PHP

<?php
declare(strict_types=1);
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Mail;
class TestMail extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
#[\Override]
protected $signature = 'uwil:mail:test';
/**
* The console command description.
*
* @var string
*/
#[\Override]
protected $description = 'Send test email to equipe.web@ldc.fr';
/**
* Execute the console command.
*/
public function handle(): void
{
Mail::raw(sprintf('UWIL mail-test from %s %s', \config('app.name'), \config('app.url')), function ($msg): void {
$msg->to('equipe.web@ldc.fr')->subject('Test Email');
});
}
}