Jobs/SendQueuedEmail.php

larasend · app/Jobs/SendQueuedEmail.php · php · MIT
email, tag:knn-classified

Laravel queued job that sends queued emails via configured providers, handling retries.

// Source: https://github.com/savvyagents/larasend | License: MIT | Copyright 2026 Larasend
// Provided via justclaw.it.com; keep this notice with the code.
<?php

namespace App\Jobs;

use App\Events\EmailActivityUpdated;
use App\Models\Email;
use App\Services\Providers\EmailProviderFactory;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Queue\Queueable;
use Illuminate\Support\Facades\Storage;
use Throwable;

class SendQueuedEmail implements ShouldBeUnique, ShouldQueue
{
    use Queueable;

    public int $tries = 3;

    public int $timeout = 30;

    public int $uniqueFor = 3600;

    /**
     * @return array<int, int>
     */
    public function backoff(): array
    {
        return [5, 30, 120];
    }

    public fun

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key