Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
TestMail
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 handle
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace App\Console\Commands;
4
5use Illuminate\Console\Command;
6use Illuminate\Support\Facades\Mail;
7
8class TestMail extends Command
9{
10    /**
11     * The name and signature of the console command.
12     *
13     * @var string
14     */
15    protected $signature = 'uwil:mail:test';
16
17    /**
18     * The console command description.
19     *
20     * @var string
21     */
22    protected $description = 'Send test email to equipe.web@ldc.fr';
23
24    /**
25     * Execute the console command.
26     *
27     * @return void
28     */
29    public function handle()
30    {
31        Mail::raw(sprintf('UWIL mail-test from %s %s', \config('app.name'), \config('app.url')), function ($msg) {
32            $msg->to('equipe.web@ldc.fr')->subject('Test Email');
33        });
34    }
35}