mettle / sendportal

Open-source self-hosted email marketing. Manage your own newsletters at a fraction of the cost.

Home Page:https://sendportal.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do I configure Sendportal to send 1 email at a time every x minutes when processing a campaign queue?

githubcom13 opened this issue · comments

How do I configure Sendportal to send 1 email at a time every x minutes when processing a campaign queue?

You kind of. can edit the command file

to

    /**
     * Get all queued campaigns.
     */
    protected function getQueuedCampaigns(): EloquentCollection
    {
        return Campaign::where('status_id', CampaignStatus::STATUS_QUEUED)
            ->where('scheduled_at', '<=', now())
            ->limit(1) //added limit to it
            ->get();
    }

in file vendor/sendportal-core/src/Console/Commands/CampaignDispatchCommand.php

This will limit all campaigns to send 1 email at every 1 minute.