<?php

namespace App\Console\Commands;

use Exception;
use Illuminate\Console\Command;
use Mtc\Core\EmailsQueued;

class SendQueuedEmailsCommand extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'emailsQueued:send';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Send queued emails command';

    /**
     * Execute the console command.
     *
     * @return int
     * @throws Exception
     */
    public function handle(): int
    {
        EmailsQueued::send();
        return 0;
    }
}
