Drupal is a registered trademark of Dries Buytaert
drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)!

Cloudflare Email lets Drupal send outbound transactional email through the
Cloudflare Email Service REST API — no SMTP relay required, ideal for hosts
that block outbound mail ports.

Many hosting platforms block outbound SMTP (ports 25/587), which stops
Drupal from sending account, password-reset and notification emails. This
module replaces Drupal's mail backend with one that talks to the
Cloudflare Email Service over HTTPS.

Features

  • A drop-in mail backend that routes all of Drupal's outgoing mail through
    the Cloudflare Email Service REST API.
  • Sends both plain-text and HTML messages, with a plain-text fallback
    generated automatically from HTML mail.
  • Stores your Cloudflare API token securely with the
    Key module — the token
    is referenced by ID and never written into exported configuration.
  • A settings page for your account ID, API token, and default
    from-address/name.
  • A status report (Reports → Status report) health check that
    tells you whether the module is configured and active.
  • A Drush command, drush cloudflare-email:test, to send a test
    message and confirm your setup.

Use this module when your site runs on infrastructure where outbound SMTP is
blocked, when you want REST-based transactional email without standing up an
SMTP relay, or when you already manage your DNS through Cloudflare.

Post-Installation

  1. Create a Key entity at
    /admin/config/system/keys/add (type
    Authentication) holding a Cloudflare API token that has the
    Email Sending: Send permission. The environment-variable or file
    key provider is recommended for production.
  2. Go to Configuration → System → Cloudflare Email
    (/admin/config/system/cloudflare-email) and enter your
    Cloudflare account ID, select the API token key, and set a default
    from-address and name.
  3. Make the plugin Drupal's default mail backend, e.g. in
    settings.php:
    $config['system.mail']['interface']['default'] = 'cloudflare_email';
    (or via Drush / the Mail System module).
  4. Verify with drush cloudflare-email:test [email protected].

The from-address must be on a sending domain you have verified in the
Cloudflare dashboard, which provisions the required DNS records (MX, SPF, DKIM,
DMARC).

Additional Requirements

  • Drupal 10.3+ or 11.
  • The Key module, for
    storing the API token.
  • A Cloudflare account on the Workers Paid plan with the Email Service
    enabled, a verified sending domain, and an API token with the
    Email Sending: Send permission.
  • Mail System — set
    Cloudflare Email as the mail backend per formatter/plugin through the UI
    instead of editing settings.php.
  • Drush — provides the
    cloudflare-email:test command.

Similar projects

  • SMTP Authentication
    Support
    and Symfony
    Mailer
    send over SMTP, which needs an open outbound mail port and a
    relay. This module is HTTPS/REST-only and needs neither.
  • Provider-specific modules (SendGrid, Mailgun, Postmark, etc.) target their
    own APIs. This module is for sites already using Cloudflare, letting DNS,
    reputation and authentication stay in one place.

Supporting this Module

Bug reports and patches are welcome in the
issue
queue
.

Community Documentation

What this module does not do (yet)

  • Attachments are not yet supported.
  • Inbound mail / Email Routing is out of scope; this is sending-only.
  • Bounce and complaint webhooks are not yet processed.

Activity

Total releases
1
First release
May 2026
Latest release
19 hours ago
Release cadence
Stability
0% stable

Releases

Version Type Release date
1.0.x-dev Dev May 29, 2026