1. Go to this page and download the library: Download timedoor/mail-logger library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Timedoor\MailLogger\Logger\MailLogger;
use Timedoor\MailLogger\Models\MailLog;
class MailController extends Controller
{
public function resend(MailLog $email)
{
MailLogger::resendMailById($email->id, true); //true for --now option
return redirect()->back();
}
public function resendAll(MailLog $email)
{
MailLogger::resendUnsentMails(true); //true for --now option
return redirect()->back();
}
public function prune($x)
{
MailLogger::pruneMails(now()->subHours($x)); // prune emails older than $x hours
return redirect()->back();
}
}