Single source of truth for Birkly CMS documentation

These recipes walk through adding each supported email provider in Settings → Connections. Each recipe assumes you already have an account with the provider and a verified domain or sender address. If you are unsure which provider to choose, start with a managed Email Service Provider (ESP) such as Resend or Postmark rather than your host’s SMTP, because ESPs handle deliverability, bounces, and DNS records for you.

Birkly supports five email transports out of the box: SMTP (generic), Resend, Postmark, Amazon SES, and Mailgun. For each provider you create an Email Connection in Settings → Connections, enter the provider-specific fields, and click Test. The recipes below list the exact values to paste and common pitfalls. After setup, map the Connection to an alias such as transactional_email so plugins can use it without knowing which provider you picked.

Beginner

Before you start

  1. Open Settings → Connections.
  2. Click Add connection and choose the Email type.
  3. Pick the provider/transport that matches your account.
  4. Give the Connection a clear name, for example Resend production or Mailgun EU.
  5. Save, then click Test send.
  6. If the test succeeds, go to Aliases and map transactional_email to this Connection.

Generic SMTP

Use SMTP when you have your own mail server or a host-provided relay.

Fields you need:

FieldExampleNotes
Hostsmtp.example.comYour mail server hostname.
Port587 or 465587 usually uses STARTTLS; 465 usually uses SSL.
EncryptionSTARTTLS, SSL, or NoneMatch your port.
Usernameyou@example.comOften the full email address.
Passwordapp-specific passwordUse an app password, not your login password.
From addressnoreply@example.comMust be allowed by the server.
From nameBirklyDisplay name recipients see.

Common problems:

  • Docker hosts often block outbound SMTP on port 25/587. If test fails with a network timeout, switch to an ESP or ask your host to open the port.
  • Gmail / Outlook personal accounts require app-specific passwords and may have strict sending limits. For production sites, use a transactional ESP instead.
  • Wrong encryption/port pair is the most common failure.

Resend

Resend is a transactional email service with a simple HTTP API.

Fields you need:

FieldExampleNotes
API keyre_xxxxxxxxxxxxxxxxCreate in Resend dashboard → API keys.
From addressonboarding@yourdomain.comMust be a verified domain or a Resend-provided test address.
From nameYour siteDisplay name.

After saving:

  1. Click Test send.
  2. If the domain is not verified, Resend accepts mail only from a test address or may reject depending on your plan.
  3. Add the Resend bounce/complaint webhook URL in Connections → Webhooks if you want automatic suppression updates.

Postmark

Postmark focuses on transactional email and provides clear delivery events.

Fields you need:

FieldExampleNotes
Server API tokenxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxFrom a Postmark server, not an account token.
From addressnoreply@yourdomain.comMust match a verified sender signature.
From nameYour siteDisplay name.

After saving:

  1. Click Test send.
  2. In Postmark, copy the inbound webhook URL from Connections → Webhooks and paste it into Postmark → Webhooks so bounces and spam complaints update Birkly’s suppression list.

Amazon SES

Birkly prefers the Amazon SES HTTPS API adapter. You can also use SES-SMTP credentials through the generic SMTP transport if you prefer.

Fields for the SES HTTPS API adapter:

FieldExampleNotes
Access key IDAKIA...IAM user with ses:SendRawEmail permission.
Secret access key...Stored encrypted.
Regionus-east-1Your SES region.
From addressnoreply@yourdomain.comMust be a verified identity in SES.
From nameYour siteDisplay name.

IAM permission needed:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["ses:SendEmail", "ses:SendRawEmail"],
      "Resource": "*"
    }
  ]
}

After saving:

  1. Click Test send.
  2. SES in sandbox mode only sends to verified addresses. Move out of sandbox for production.
  3. Configure SNS → HTTPS webhook to /api/webhooks/connections/{id} for bounce/complaint delivery.

Mailgun

Mailgun provides both US and EU endpoints.

Fields you need:

FieldExampleNotes
API keykey-xxxxxxxxxxxxxxxxFrom Mailgun dashboard → Settings → API keys.
Domainmg.yourdomain.comMust be active in Mailgun.
RegionUS or EUChoose the region where your domain is hosted.
From addressnoreply@mg.yourdomain.comMust belong to the configured domain.
From nameYour siteDisplay name.

After saving:

  1. Click Test send.
  2. Add Mailgun webhook URLs for permanent fail and spam complaints in Connections → Webhooks.

DNS: SPF, DKIM, DMARC

Birkly does not generate DKIM keys for you; your provider does. The provider recipe is incomplete until DNS is correct:

  1. Add the provider’s SPF include to your domain’s TXT record.
  2. Add the DKIM record the provider gives you.
  3. Add a DMARC policy record such as v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com.

The Email Connection checklist links to provider-specific DNS instructions. Incorrect DNS is the most common cause of messages landing in spam.

Choosing between providers

Choose thisWhen
ResendFastest setup, generous free tier, strong developer focus.
PostmarkStrictly transactional, excellent deliverability reputation, detailed events.
Amazon SESLowest cost at scale, already in AWS, comfortable managing IAM/SNS.
MailgunNeed EU residency, complex routing, or existing Mailgun workflows.
SMTPYou already run a reliable mail server and cannot use an ESP.
LogLocal development only; never for production.
Advanced Users

Environment-variable overrides

Each provider field can be overridden by an environment variable. When an env override is active, the admin shows Managed by environment and the field is read-only. Common variables:

ProviderVariable examples
SMTPBIRKLY_SMTP_HOST, BIRKLY_SMTP_PORT, BIRKLY_SMTP_USER, BIRKLY_SMTP_PASS, BIRKLY_SMTP_FROM
ResendBIRKLY_RESEND_API_KEY, BIRKLY_RESEND_FROM
PostmarkBIRKLY_POSTMARK_API_TOKEN, BIRKLY_POSTMARK_FROM
SESBIRKLY_SES_ACCESS_KEY, BIRKLY_SES_SECRET_KEY, BIRKLY_SES_REGION, BIRKLY_SES_FROM
MailgunBIRKLY_MAILGUN_API_KEY, BIRKLY_MAILGUN_DOMAIN, BIRKLY_MAILGUN_REGION, BIRKLY_MAILGUN_FROM

Exact variable names may be finalized when core implementation reports stable API names.

Provider adapter interface

Core exposes a thin adapter interface. Official adapters are native PHP + cURL; no Composer SDK is required. A custom adapter can be registered by a plugin if it implements the contract:

  • send($envelope) — accepts to, from, subject, html, text, attachments, headers, idempotency key.
  • parseResponse($httpResponse) — returns provider message id or error.
  • webhookHandlers() — returns map of event types to suppression/ status actions.

Webhook endpoints per provider

Bounce/complaint webhooks are registered under Connections → Webhooks. The URL pattern is /api/webhooks/connections/{id}. Provider-specific setup:

ProviderWebhook events to enable
Resendbounce, complaint, delivery
PostmarkBounce, SpamComplaint
SESSNS → HTTPS to the endpoint; subscribe the endpoint to Bounce and Complaint topics
Mailgunpermanent_fail, complained

The verify helper checks the provider signature before acting on the payload.

SES SigV4 fallback

If the native SES HTTPS adapter is unavailable on your build, use SES-SMTP credentials through the generic SMTP transport. Retrieve SMTP credentials from the SES console, choose region-specific host such as email-smtp.us-east-1.amazonaws.com, port 587, and STARTTLS. Document this path in the Connection notes.

Rate limits and queueing

Providers enforce rate limits. Birkly respects them with per-connection soft caps and queues bursts. If you hit a rate limit, the status remains queued and retries automatically. For high-volume sites, warm up the provider domain reputation before sending large batches.