API email transports and batch sending in Mautic

Mautic can send through an API transport or a transport plugin, and the choice changes throughput, callback handling and bounce data. This page explains how to pick and configure one.

On this page

How a Mautic API email transport changes sending and callbacks

A team sending marketing email from a self-hosted Mautic instance through a third-party provider has to choose between a Symfony Mailer API transport and a Mautic transport plugin, and that choice decides two things: whether each email becomes its own API request or sends are grouped into batches, and whether the provider's callbacks for bounces, complaints and unsubscribes reach Mautic at all. The two routes differ in how sends are grouped and how events return. A Symfony Mailer API transport hands over one message per request, so Mautic's own handling of the provider's response carries most of the delivery logic. A Mautic transport plugin is built for a specific provider and can batch sends and process that provider's callbacks, which is why it is usually the stronger fit when the provider's event feed matters to your suppression and unsubscribe handling. SendGrid and SparkPost are used here only as examples of providers that Mautic's plugin ecosystem has covered, not as endorsements or recommendations.

Before you pick a route, confirm three things against the Mautic version you run and the provider's current documentation: the exact transport names available, the batch size each route uses, and the callback endpoints you must register with the provider and point at your instance. This page does not supply those figures, and they change with releases and provider plans, so record them from the sources rather than from memory. Check also that the callback endpoints are reachable from the internet over HTTPS on your own domain, because a callback that fails silently leaves bounced and complaining addresses active in your segments. The DSN-based setup, including scheme, credentials and port choices, is covered on the sibling page on Mautic transports with a DSN, so this section stays with the sending model and event return.

What you need before choosing an API transport

Before comparing API transports with plugin transports, confirm the Mautic release, server, network path and provider account are ready. Each item below affects which transport options are practical and how much work the rollout takes.

A supported Mautic release line

Pick a release line that still receives security support for the whole period you plan to run it. Mautic 7.0 requires PHP 8.2, 8.3, 8.4 or 8.5, MySQL 5.7 or higher with InnoDB or MariaDB 10.2 or higher, and Apache, Nginx or IIS, and it needs npm from Mautic 5.0 onward. Check these against the current requirements page for the exact release you choose, because older lines have different PHP and database floors.

Minimum PHP for 7.0
PHP 8.2+
Mautic requirements

A VPS or dedicated server

The Mautic project states that Mautic should not run on shared hosting and recommends a VPS or dedicated server. Confirm that the host gives you root or sudo access, control over PHP and cron, and enough memory and disk for your contact volume. Ask your hosting provider in writing whether they allow the long-running background processes Mautic needs.

A working queue path

If emails are queued, Mautic needs a messenger consumer running in addition to the cron jobs for segments, campaigns and the broadcasts command. Without it, queued sends stay in the queue and never leave the server. Test a small send end to end in a staging environment and confirm the worker restarts after a reboot.

A provider account with API credentials

Create the account with your transport provider and generate an API key with only the permissions Mautic needs to send mail and receive events. Store the key in your secrets process, not in a shared configuration file. Record who owns the account, because a departed owner can block sending during an incident.

An authenticated sending domain

The sending domain must already have SPF, DKIM and DMARC configured before the first production send, or mailbox providers may route mail to spam. Confirm that the provider signs messages with a domain you control and that the domain matches the From address set in Mautic. Verify the records with a lookup tool before you run a test campaign.

Outbound HTTPS and a callback endpoint

The Mautic server must reach the provider's API over outbound HTTPS, and the provider must reach a public HTTPS endpoint on your side to post bounce, complaint and unsubscribe callbacks. Check firewall and proxy rules in both directions, and confirm the certificate is valid. Confirm the callback setup, the signing method and the API rate limits in the provider's own documentation, because those values change.

Choosing between a Symfony Mailer API transport and a batching plugin

When Mautic sends a modest number of individual emails, such as a password reset, a form confirmation or a single notification triggered by a campaign step, a Symfony Mailer API transport is usually the simpler choice. The transport takes each message, builds one API request for it and waits for the provider's response before the next message is handled. Each email is one request, so the behavior is easy to trace in logs and to reason about when something fails.

  • Per-request behavior: each message maps to one call to the provider's API, with its own response and error code.
  • Plugin behavior: a batching plugin adds little here, since there is rarely a batch to fill.
  • Failure handling: a failed request affects one message, which makes retries and troubleshooting straightforward.
  • Test focus: send a message to each mailbox domain you use, confirm the from address and reply-to, and check the message log.
  • Credentials: confirm the API key scope and where the DSN is stored, since a leaked key affects every send.

Before relying on this path, confirm in a test instance which transport schemes your installed Mautic version supports, because provider support must be checked for that version.

How to configure an API transport in Mautic

This sequence takes a Mautic instance from a verified release and PHP stack to a provider API transport that sends a test message, processes a queued send and records a callback against a test contact.

  1. Confirm the Mautic release and PHP version

    Before touching the mailer, the administrator confirms the installed Mautic release is on a supported line and that the PHP version falls within the range that release requires. Mautic 7.0 requires PHP 8.2, 8.3, 8.4 or 8.5, and the Mautic releases page lists the support end dates for each line, so check those against your upgrade plan first. Confirm the instance is on a VPS or dedicated server, since the project advises against shared hosting. Done means you have written down the release, the PHP version and the support window in your change record.

  2. Install the transport and its dependencies

    The platform or developer administrator adds the chosen transport bridge through Composer or the supported plugin path, then runs the dependency install so the autoloader and cache pick it up. Mautic is installed with Composer using the recommended project template from version 4.0 onward, so use that same project to avoid a divergent vendor tree. Confirm the transport appears as a selectable option in the mailer settings. The check is a clean cache clear with no fatal errors in the Mautic logs and the new transport listed in the mailer dropdown.

  3. Create least-privilege provider API credentials

    The provider account owner creates a dedicated API key or token for Mautic, limited to the send permission and nothing broader, and records the key owner and rotation date in your secrets register. Keep the key separate from any personal or marketing-team credential so it can be revoked without disrupting other systems. Confirm the scope against the provider's current documentation, because permission names change between providers and product versions. The check is a test call made with that key alone that succeeds for sending and fails for an operation it should not reach.

  4. Enter credentials in the mailer settings

    The Mautic administrator enters the API key, sending domain and any region or endpoint option into the mailer configuration, and stores the secret through the environment or configuration file rather than leaving it in a shared screen capture or ticket. Check the sending from address matches a domain you have authenticated with the provider. The check is that the settings save without validation errors and the test connection in the mailer screen reports success.

  5. Register the callback URL in the provider console

    The provider administrator adds the Mautic callback endpoint to the event or webhook settings of the sending account, selecting only the event types Mautic processes for bounces, complaints, unsubscribes and delivery status. Use the callback URL generated by your Mautic instance, served over HTTPS on the public domain that the proxy routes to Mautic. Confirm the provider supports signed or authenticated callbacks and enable that option if it does. The check is that the provider's console shows the endpoint as active and a provider-side test event returns a successful response code.

  6. Run the cron jobs that queued sends need

    The platform administrator confirms the scheduled jobs are running on staggered schedules, including the broadcasts command that sends segment emails and the messenger consumer that processes queued messages. Check the cron jobs documentation for the exact commands and staggering guidance for your Mautic line, and make sure the consumer runs under a process supervisor so it restarts after failure. The check is that the consumer reports as running and that the broadcasts job logs a successful run with no errors.

  7. Send a test email to an internal mailbox

    The campaign or email owner sends a test email from Mailer settings to an internal mailbox that you can inspect at header level. Confirm the message is queued, then processed by the messenger consumer, and arrives with the expected from address, a List-Unsubscribe header if your configuration sets one, and the authentication results your provider adds. Check the Mautic log for the send record and the provider console for the matching message ID. Done means the message arrives with correct headers and the send appears in both systems.

  8. Confirm a callback event against a test contact

    The Mautic administrator uses a test contact at an address you control, triggers a controlled bounce or unsubscribe at the provider, and checks that the callback reaches Mautic and updates the contact record. Confirm the event appears in the contact timeline and in the Mautic log, and that the contact's status changes as expected. Remove the test contact and the test events from production reporting when the check is complete. The check is a logged callback event tied to that test contact, which shows the return path works before any live campaign starts.

How sends and callbacks move between Mautic and the provider

A campaign or broadcast hands contacts to Mautic's messenger queue, which the messenger consumer drains into the mailer. The transport either posts one request per email or groups sends into a batch before calling the provider's API, and the provider delivers to the mailbox. Provider callbacks return to a public Mautic endpoint, which records bounces, complaints and unsubscribes on the contact. Check that the cron jobs and the messenger consumer keep running, because a stopped consumer leaves sends queued and callbacks unprocessed.

Send path from Mautic to the provider, with callbacks returning to a public endpoint.

Data and events mapped between Mautic and the provider

This table compares each field and event that crosses between Mautic and an email provider, the owner of each mapping decision, and what the team should confirm. Read it before configuring a transport, because a mismatch in a header or event name can leave bounces and complaints unrecorded against the right contact. Field and event names differ between transport plugins and providers, so confirm each one in the installed plugin and the provider documentation.

Field or eventWhat crosses the boundaryMapping ownerWhat to confirm
From address and sender nameSender address and display name set in Mautic, passed to the provider as the envelope and header senderMarketing team sets values; platform team confirms the domain is authenticatedSending domain is verified with the provider and matches the authenticated domain
Reply-to addressReply address carried in the message headers so replies reach a monitored mailboxMarketing teamWhether the transport passes reply-to unchanged and that the mailbox is monitored
Message ID and custom headersIdentifier Mautic attaches so provider callbacks can be matched to the sent email and contactPlatform teamHeader name the plugin uses, and whether the provider returns it in callback payloads
Recipient address and contact IDRecipient email sent to the provider; contact ID carried in metadata or custom arguments for matchingPlatform team with marketing operationsWhether contact ID is returned in events, or only the address, and how duplicates are handled
List-Unsubscribe headerUnsubscribe link and mailto value added to outgoing messages for mailbox providersMarketing team sets policy; platform team confirms headers are sentWhether the transport forwards the header and whether one-click unsubscribe is supported
Delivered eventProvider confirmation that the message was accepted by the recipient mail serverProvider reports; platform team maps to MauticEvent name in the plugin and whether Mautic records it or only logs it
Bounced eventHard or soft failure reported by the provider, usually with a reason codePlatform team maps; marketing team sets suppression rulesWhich bounce types the plugin treats as hard, and whether soft bounces are retried
Complained eventRecipient marked the message as spam, reported to the provider through a feedback loopMarketing team owns suppression response; provider supplies the feedbackWhether the plugin marks the contact as do not contact and how complaints are logged
Unsubscribed eventRecipient opted out through a provider-side link or list actionMarketing team owns consent policy; platform team confirms syncWhether the event updates the Mautic contact preference or only the provider list

Security settings for API transport credentials and callbacks

API transports hold a sending credential that can send mail as your domain, and some providers post delivery events back to a public Mautic endpoint. The controls below cover where the credential lives, what it is allowed to do, and how incoming callbacks are trusted and logged. Confirm each one against the plugin and provider you choose, and record the decisions for your compliance team.

Store keys in Mautic configuration

Keep the provider API key in Mautic's configuration, not in tickets, shared drives, chat or spreadsheets. Restrict read access to the configuration file on the server and limit database access to the Mautic database account and the administrators who need it. Check whether your plugin stores the key encrypted or in plain text in the configuration, and confirm who on the hosting side can read the file. Record where the key lives and who can read it.

Scope keys to sending only

Create a key that has only the permissions the transport needs, typically the ability to send mail. Avoid reusing a key that also manages account settings, suppression lists, domains or billing. Confirm the exact permission set in your provider's console, because permission names differ between providers. A narrowly scoped key limits the damage if it is copied from a server or exposed in logs.

Rotate keys on staff changes

Rotate the sending key when someone with access to the server, the Mautic admin panel or the provider console leaves the team, and after any suspected exposure. Plan the rotation so the new key is saved in Mautic and a test send succeeds before the old key is revoked. Confirm whether your provider lets two keys be active at once, which makes the switch safer. Log each rotation with the date and the reason.

Verify callback signatures

Where the provider signs webhook requests or supplies a shared secret, configure the plugin to check that signature before it processes bounce, complaint or unsubscribe events. Reject requests that fail the check. Confirm whether your provider offers signing for the event type you need, and whether the Mautic plugin supports verifying it. If the provider offers no signing mechanism, document that gap and the compensating controls you accept.

Limit the callback endpoint

Expose only the callback path the transport needs, and serve it over TLS with a valid certificate. Block other Mautic paths at the reverse proxy or web server so that the public internet cannot reach the admin area through the callback route. Restrict source addresses where the provider publishes them and the platform allows it. Confirm the exact path with the plugin documentation before you write the proxy rule.

Log callback processing

Record each received callback with its time, event type, result and the processing outcome, including rejected requests. Keep these logs in a location with restricted access and a retention period your policy sets. Use the logs to confirm that bounces and unsubscribes were applied to the right contacts, and to answer audit questions about how a contact was suppressed. Confirm what the plugin logs by default and what you must enable.

Common failures when an API transport is enabled

This table lists the failures teams most often hit after switching Mautic to an API transport, with the likely cause and the check that confirms the fix. Read each row as a symptom to test in order, starting with sending authentication and queue processing before callbacks and batch settings.

FailureLikely causeFix and confirming check
Test sends accepted but not deliveredThe sending domain or from address is not authenticated with the providerPublish the provider's SPF and DKIM records for the sending domain, then confirm alignment in the provider's activity log and a received message's headers
Queued emails never leave the systemThe messenger consumer is not running, so queued messages wait indefinitelyStart the consumer under a process supervisor, then confirm the queue drains after a test campaign send
Provider callbacks never reach MauticA proxy, web application firewall or host firewall blocks the callback endpointAllow inbound requests to the callback path from the provider's published sources, then replay a test event and check the request log
Bounces and complaints do not update contactsThe callback secret does not match, or the provider message ID is not stored for matchingRe-enter the signing secret exactly as the provider issues it, send a test bounce to a non-production contact, and confirm the contact record changes
Duplicate or missing sends after batch settings changeBatch size or cron timing changed while earlier messages were still queued or retriedPause sending, drain the queue, change one batch setting at a time, then compare the send log against the planned recipient count
Outbound API calls failThe server cannot reach the provider's API over HTTPS on the required portTest outbound HTTPS from the Mautic host to the provider's API endpoint and confirm egress rules and DNS resolution before the next send

Questions teams ask before choosing or configuring an API transport

What does an API transport setup cost and what drives the price?

The cost depends on the scope written into the engagement, not on a standard package. Most of the work is configuring the transport, creating or reviewing the provider account, wiring Mautic's bounce and complaint handling, and testing sends and callbacks across each environment. The main drivers are the number of environments (production, staging and any sandbox), how many provider accounts and sending domains are involved, whether queues and callback endpoints must be tested under load, and the size of the contact base that will be sent to. DeployOpen does not publish a price list, so ask for a quote built from a written scope that lists each environment, transport and test case.

How long does a typical transport setup and test cycle take?

Duration depends mainly on how many environments must be configured, how quickly the provider account and DNS changes can be approved inside your organization, and how many test rounds the callbacks need. A single environment with an existing provider account is a shorter exercise than a multi-environment rollout that needs new accounts and domain records. Ask any partner, including DeployOpen, to state the phases, the dependencies on your staff and the test rounds in the written scope before work starts, and to name which steps wait on your approvals.

What does our team need to provide during the engagement?

Expect to supply four things. First, administrator access to the email provider account so the API key and webhook or event settings can be created and reviewed. Second, DNS access, or a contact who can publish records, for the sending and tracking domains. Third, a test mailbox that can receive sends, bounces, complaints and unsubscribes. Fourth, a named owner who will act on bounce and complaint events after go-live. Without that last owner, callbacks are processed but nobody decides what happens to the affected contacts.

Can a competent internal team configure an API transport alone?

Yes, a team with Mautic and email operations experience can usually do it alone, provided it has the access listed above and time to test. The work is mostly configuration and verification rather than custom development. The risks are in the details: credentials passed through the DSN incorrectly, callbacks that never reach Mautic because the endpoint is not reachable, and sending from domains that are not authenticated. Teams that lack recent experience with these checks often use an outside partner for the test cycle or a review before go-live, while keeping ownership of the live system.

How do we test callbacks and queued sends before a campaign goes live?

Start with a small list of test mailboxes in a non-production environment. Send one message through the transport, confirm the delivery event reaches Mautic, then trigger a bounce and a complaint using the provider's test addresses or sandbox tools. Check that the contact is marked correctly and that the unsubscribe path works. Confirm the queue worker and the messenger consumer are running, since queued emails will not send without them, and that the cron jobs are staggered as the Mautic documentation describes. Record each result so the sign-off has evidence.

What should we ask for in a written quote for this work?

Ask the provider to list the transports in scope, the environments, the provider accounts and sending domains, and the callback endpoints to be tested. Request the test cases, the acceptance criteria, and the deliverables such as configuration notes and a test record. Ask which tasks depend on your staff and what happens if an approval is delayed. Confirm whether ongoing support or retesting after upgrades is included or quoted separately, and ask which Mautic release line the work targets. DeployOpen provides a quote from a written, fixed scope, so request one with these items named.

Do we need to decide the transport before the email domain setup?

Yes, because the transport determines which authentication records, tracking domains and provider settings are needed. Choose the provider and its sending model first, then plan SPF, DKIM and DMARC for the sending domain and any tracking domain it requires. Changing the transport later often means new DNS records, new credentials and another round of testing, so the decision should be recorded with the domain plan.

How DeployOpen works on this

DeployOpen plans, implements, tests and documents Mautic transport integrations inside your own infrastructure, so the choice between an API transport and a batch-capable plugin is made against your volumes, your sending domains and your compliance requirements. Engagements are fixed-scope, with the work agreed in writing before it starts.

How we scope

  • Inventory your sending volumes, campaign types, transactional mail and the sending domains each transport would use.
  • Record which transport options your provider supports, including batch sending and callback processing, and confirm them with the vendor.
  • Agree deliverables, environments and acceptance tests in writing, with ongoing support available as a retainer after handover.

How we build

  • Configure the Symfony Mailer DSN or the transport plugin, with credentials kept in secrets storage rather than in plain configuration files.
  • Set up the cron jobs and messenger consumer that queued and batched sends depend on, and stagger them against your other background jobs.
  • Test delivery, bounce and complaint callbacks and unsubscribe handling end to end in a non-production instance before any live campaign.

How we hand over

  • Document the chosen transport, DSN format, callback URLs, queue settings and the reasons behind each decision for your engineers.
  • Provide a runbook covering failed sends, webhook errors, rate limits and how to switch transports if a provider changes terms.
  • Walk your operations and marketing teams through test results and the checks to run before each new campaign goes out.

How we support

  • Offer retainer support for monitoring callback health, applying Mautic release updates and reviewing transport settings as volumes change.
  • Re-test the transport after Mautic upgrades or provider changes, and report any regressions with planned fixes.
  • Support your compliance and security reviews by preparing configuration evidence, with independent auditors providing any formal assessment.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.