Mautic + MailKite
Mautic is an open-source marketing automation platform. Mautic 5+ runs on Symfony Mailer with a DSN-based transport config, so mailkite/symfony-mailer is a first-party MailKite transport — no SMTP round-trip, honest error surfacing from the API instead of a generic SMTP rejection.
What you need
- A verified domain with SPF + DKIM published
- Your API key (
mk_live_…) - Mautic 5 or later (self-hosted; requires Composer access to the install)
Recommended: the Symfony Mailer transport
Install the package alongside Mautic:
composer require mailkite/symfony-mailer Set the Mailer DSN — either in .env.local or wherever your Mautic install reads MAILER_DSN (some hosts set this in Settings → Email Settings → Service: DSN instead):
# .env.local (or wherever Mautic reads MAILER_DSN)
MAILER_DSN=mailkite+api://mk_live_...@default The API key goes in the DSN's user slot — no separate SMTP username to invent. Mautic autoconfigures the transport factory once the package is installed; nothing else to register.
Alternative: SMTP
If you can't install a Composer package (managed hosting, no shell access), point Mautic's SMTP transport at MailKite's relay instead:
| SMTP Host | smtp.mailkite.dev |
| SMTP Port | 587 |
| Encryption | TLS (STARTTLS) |
| Username | mailkite |
| Password | Your API key (mk_live_…) |
| From Address | hello@yourdomain.com (on a verified domain) |
# Settings → Email Settings → New (fallback path, no package install)
Name: MailKite
Email Address: hello@yourdomain.com
Service: Other
SMTP Host: smtp.mailkite.dev
SMTP Port: 587
SMTP Auth: Yes
SMTP Username: mailkite
SMTP Password: mk_live_...
SMTP Encryption: TLS A note on batch sending
Symfony Mailer transports — including this one — send one email per request; Mautic's own batching/queue layer is what fans out a campaign send into individual calls. If you're calling MailKite directly outside Mautic for very high-volume sends, use the PHP SDK's sendBatch() instead of looping the transport.
Test it
Create a test email in the Mautic email editor and use the Send test button to verify the connection. Check your MailKite dashboard to confirm the message was delivered — errors now surface with MailKite's own message (e.g. "domain not verified") instead of a generic SMTP rejection.
Troubleshooting
- Emails not sending — confirm the
fromaddress is on a verified domain. - DSN not picked up — clear Mautic's cache after changing
MAILER_DSN:bin/console cache:clear. - 535 Authentication failed (SMTP path) — your password must be your
mk_live_…API key, not a separate SMTP password.
Full transport reference: Symfony Mailer transport. See the SMTP relay docs for the full connection reference, or all integrations for other platforms.