Skip to content

Self-hosted alternatives to Mailgun

Mailgun is a hosted email service that sends, receives and tracks mail for applications through an API or SMTP. Two listed apps do its main job and run in your own Cloudflare account.

Each answer comes from the app’s README and source code, compared with the features Mailgun describes on its own site.

  • MailySend dashboard overview with sent, delivered and bounced counts and an hourly send curve

    Resend-compatible email platform in your own Cloudflare account, with sending, broadcasts, automations and inbound mail

    Deploy
    One-click
    License
    MIT
    GitHub stars
    47 stars
    Last commit
  • EmailFlare Inbox landing page with a mockup of the conversation list and a contact thread

    Transactional email API and shared team inbox built on Cloudflare Email Sending, Email Routing and D1

    Deploy
    CLI
    License
    MIT
    GitHub stars
    278 stars
    Last commit

Mailgun features, app by app

FeatureMailySendEmailFlare
Send mail through an APIYesYes
SMTP relayPartlyNo
Inbound email routing and parsingYesPartly
TemplatesYesYes
Webhooks for delivery eventsYesNo
Logs and delivery trackingYesYes
Suppression of bounces and complaintsYesPartly
Email address validationNoNo

Resend-compatible email platform in your own Cloudflare account, with sending, broadcasts, automations and inbound mail

What a Mailgun user would miss
There is no email address validation, and sending over SMTP needs a separate container.
What it adds
Broadcasts, automations, inbound mailboxes and parsed DMARC reports come with it, and mail can fail over between Cloudflare Email Service, Amazon SES, Resend and SMTP.
  • Yes Send mail through an API. Resend-compatible API with batches, scheduling and idempotency keys.
  • Partly SMTP relay. SMTP ingress runs as a separate container, because Workers cannot listen on a TCP port.
  • Yes Inbound email routing and parsing. Email Routing delivers to mailboxes with MIME parsing and reply threading.
  • Yes Templates. Handlebars, MJML and JSX templates.
  • Yes Webhooks for delivery events. HMAC-signed webhooks, retried and replayable.
  • Yes Logs and delivery tracking. Message log with a state timeline per message.
  • Yes Suppression of bounces and complaints. Bounce classification and a suppression list.
  • No Email address validation. No address validation listed.

Sources:github.com/GagnDeep/mailysend#what-you-getgithub.com/GagnDeep/mailysend#what-we-are-honest-aboutmailysend.com/compareworkersnative.directory/api/apps/mailysend

Transactional email API and shared team inbox built on Cloudflare Email Sending, Email Routing and D1

What a Mailgun user would miss
No SMTP relay, outbound webhooks or address validation, and the send API has no attachments, CC or BCC.
What it adds
API keys can be limited to chosen domains and come as test or live keys, and the same project adds a shared team inbox.
  • Yes Send mail through an API. POST /v1/send with an API key, an Idempotency-Key header and rate limiting.
  • No SMTP relay. No SMTP service in the source or docs.
  • Partly Inbound email routing and parsing. The inbox Worker receives mail through Email Routing and threads it, but there are no inbound parse routes or webhooks to your app.
  • Yes Templates. 50 built-in React Email layouts and custom Handlebars templates referenced by templateSlug.
  • No Webhooks for delivery events. No outbound webhooks, the bounce webhook route only receives reports.
  • Yes Logs and delivery tracking. Send logs page and stats with statuses sent, failed, bounced and complained.
  • Partly Suppression of bounces and complaints. Unsubscribes suppress recipients, bounce and complaint parsing needs an Email Routing rule for the return-path address.
  • No Email address validation. No address validation listed in the README or docs.

Sources:github.com/0xdps/emailflare#emailflare-api--email-sending-apigithub.com/0xdps/emailflare/blob/trunk/packages/email-core/src/index.tsgithub.com/0xdps/emailflare/blob/trunk/docs/TEMPLATES.mdworkersnative.directory/api/apps/emailflare