ldc-gen-game-web/app/Console/Commands/TestMail.php

38 lines
797 B
PHP
Raw Permalink Normal View History

2023-08-21 10:22:07 +02:00
<?php
2026-10-02 12:09:46 +02:00
declare(strict_types=1);
2023-08-21 10:22:07 +02:00
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
*/
2026-10-02 12:09:46 +02:00
#[\Override]
2023-11-23 17:31:28 +01:00
protected $signature = 'uwil:mail:test';
2023-08-21 10:22:07 +02:00
/**
* The console command description.
*
* @var string
*/
2026-10-02 12:09:46 +02:00
#[\Override]
2023-08-21 10:22:07 +02:00
protected $description = 'Send test email to equipe.web@ldc.fr';
/**
* Execute the console command.
*/
2026-10-02 12:09:46 +02:00
public function handle(): void
2023-08-21 10:22:07 +02:00
{
2026-10-02 12:09:46 +02:00
Mail::raw(sprintf('UWIL mail-test from %s %s', \config('app.name'), \config('app.url')), function ($msg): void {
2023-08-21 10:22:07 +02:00
$msg->to('equipe.web@ldc.fr')->subject('Test Email');
});
}
}