<?php

use App\Models\Email;
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;

Artisan::command('inspire', function () {
    $this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote');

//Schedule::call(function () {
//    Email::fetchProcessStoreEmail();
//})->everyMinute();

Schedule::call(function () {
    Email::deleteBulkAttachments();
})->daily();

//Schedule::call(function () {
//    Email::deleteBulkMailboxes();
//})->everyMinute();

Schedule::call(function () {
    Email::deleteMessagesFromDB();
})->everyTwoHours();

Schedule::call(function () {
    \App\Models\Log::deleteLogsFromDB();
})->everyThreeHours();

Schedule::call(function () {
   Email::cleanMailbox();
});

Artisan::command('cleanMail', function (){
    $this->comment(Email::cleanMailbox());

});
