---
title: "Configuration — Campaigns for Laravel | Roundly"
description: "Every config key, its default and env variable — store, sender, recipient rules, sending queue, delivery job and notification channel."
url: https://roundly-consulting.com/open-source/docs/campaigns-for-laravel/configuration
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

[Campaigns for Laravel](https://roundly-consulting.com/open-source/docs/campaigns-for-laravel.md)

# Configuration

The published config/campaigns.php in full:

```php
return [
    'store' => env('CAMPAIGNS_STORE', \RoundlyConsulting\Campaigns\Stores\InMemoryCampaignStore::class),
    'from-name' => env('CAMPAIGNS_FROM_NAME', ''),
    'from-address' => env('CAMPAIGNS_FROM_ADDRESS', ''),
    'recipients' => [
        'only-verified' => env('CAMPAIGNS_ONLY_VERIFIED', false),
        'contact-type' => env('CAMPAIGNS_RECIPIENT_CONTACT_TYPE', 'email'),
    ],
    'sending-queue' => env('CAMPAIGNS_SENDING_QUEUE', 'default'),
    'process-recipient-job' => \RoundlyConsulting\Campaigns\Jobs\SendCampaignEmail::class,
    'notification' => env('CAMPAIGNS_NOTIFICATION'),
    'notification-channel' => env('CAMPAIGNS_NOTIFICATION_CHANNEL', 'mail'),
];
```

## Every key

| Key | Default | Env | Purpose |
| --- | --- | --- | --- |
| `store` | InMemoryCampaignStore::class | CAMPAIGNS\_STORE | Where campaigns and recipients are kept — a Contracts\\CampaignStore. DatabaseCampaignStore::class persists them; or point at your own. Any value that isn’t a CampaignStore class throws InvalidConfigurationException — it never falls back to the in-memory store. |
| `from-name` | '' | CAMPAIGNS\_FROM\_NAME | Default sender name when a campaign is dispatched without ->from(). Seeds the DefaultFromName option. |
| `from-address` | '' | CAMPAIGNS\_FROM\_ADDRESS | Default sender address when a campaign is dispatched without ->from(). Seeds the DefaultFromAddress option. Left blank, SendCampaignEmail sends from your mailer’s global mail.from address and name. |
| `recipients.only-verified` | false | CAMPAIGNS\_ONLY\_VERIFIED | Skip owners and contacts without a verified contact when resolving recipients. Seeds OnlyVerifiedRecipients. Read strictly: true/1/on/yes or false/0/off/no; anything else throws InvalidConfigurationException. |
| `recipients.contact-type` | email | CAMPAIGNS\_RECIPIENT\_CONTACT\_TYPE | Contact kind resolved for an owner when ->viaContactType() is unset — a ContactType value: email, phone, address, url, social or custom. Seeds DefaultRecipientContactType. A typo throws InvalidConfigurationException instead of reading as email. |
| `sending-queue` | default | CAMPAIGNS\_SENDING\_QUEUE | Queue every per-recipient delivery job runs on — point a worker at it. The campaign’s job batch is opened on it when the campaign is prepared. Seeds the DefaultSendingQueue option. A blank value is not set (default); a non-string value throws. |
| `process-recipient-job` | SendCampaignEmail::class | — | Job dispatched once per recipient. Must implement Contracts\\ProcessesCampaignRecipient — any other value throws InvalidConfigurationException when the campaign starts, while it is still Pending. |
| `notification` | null | CAMPAIGNS\_NOTIFICATION | A Notifications\\CampaignNotification subclass delivered by SendCampaignNotification. Any other class fails the send, recording the InvalidConfigurationException message on the recipient. |
| `notification-channel` | mail | CAMPAIGNS\_NOTIFICATION\_CHANNEL | Route channel of SendCampaignNotification’s on-demand notifiable. Seeds the DefaultChannel option. A blank value is not set (mail); a non-string value throws. |

## Environment

Every key except process-recipient-job reads an env variable, so you rarely need to publish the config at all:

```bash
CAMPAIGNS_STORE='RoundlyConsulting\Campaigns\Stores\DatabaseCampaignStore'
CAMPAIGNS_FROM_NAME="Example Shop"
CAMPAIGNS_FROM_ADDRESS=news@example.com
CAMPAIGNS_ONLY_VERIFIED=false
CAMPAIGNS_RECIPIENT_CONTACT_TYPE=email
CAMPAIGNS_SENDING_QUEUE=campaigns
CAMPAIGNS_NOTIFICATION='App\Notifications\ProductLaunchNotification'
CAMPAIGNS_NOTIFICATION_CHANNEL=mail
```

Wrap class names in single quotes. Inside double quotes phpdotenv reads each backslash as the start of an escape sequence — \\C, \\S and \\N are not valid ones — and refuses to load the .env file.

## Strict values

A key that is not set — absent, null, or blank like a host’s CAMPAIGNS\_SENDING\_QUEUE= — takes its default. For the sender fields that default is '', which keeps the mailer’s own from; for notification it is none. A value that is set but unusable throws RoundlyConsulting\\PackageToolkit\\Exceptions\\InvalidConfigurationException naming the key, instead of quietly falling back: a store or job class that doesn’t implement its contract, a contact type that isn’t a ContactType value, a non-string queue, channel or sender, a verified-only switch outside true/1/on/yes and false/0/off/no.

## Config vs stored options

The send defaults — sender, recipient rules, sending queue and notification channel — are also runtime-editable options. The config value is only the seed: a stored option overrides it, and an explicit builder call overrides both. See Send defaults.

## Campaigns without a sender

from-address is blank by default. A campaign with neither ->from() nor a from-address default (or a stored DefaultFromAddress option) still sends: SendCampaignEmail leaves the From header to your mailer, so the email goes out from the global mail.from address and name. Set CAMPAIGNS\_FROM\_ADDRESS, or call ->from(), only when campaigns should use a different sender.

## Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

[More ways to support, including crypto](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

## Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source/docs/campaigns-for-laravel.md)
