PHPackages                             reusser/craft-cloudflare-email - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. reusser/craft-cloudflare-email

ActiveCraft-plugin[Mail &amp; Notifications](/categories/mail)

reusser/craft-cloudflare-email
==============================

Cloudflare Email Sending integration for Craft CMS

v1.0.0(3w ago)01↓100%MITPHPPHP ^8.0.2CI passing

Since May 14Pushed 3w agoCompare

[ Source](https://github.com/reusserdesign/craft-cloudflare-email)[ Packagist](https://packagist.org/packages/reusser/craft-cloudflare-email)[ RSS](/packages/reusser-craft-cloudflare-email/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (6)Versions (2)Used By (0)

[![Cloudflare Email for Craft CMS icon](./src/icon.svg)](./src/icon.svg)

Cloudflare Email for Craft CMS
==============================

[](#cloudflare-email-for-craft-cms)

This plugin provides a [Cloudflare Email Sending](https://developers.cloudflare.com/email-routing/email-sending/) integration for [Craft CMS](https://craftcms.com/).

Requirements
------------

[](#requirements)

- Craft CMS 4.0.0+ or 5.0.0+
- PHP 8.0.2+ (Craft 4) or PHP 8.2+ (Craft 5)
- A Cloudflare account with **Email Sending** enabled on a verified domain

Installation
------------

[](#installation)

#### From the Plugin Store

[](#from-the-plugin-store)

Go to the Plugin Store in your project’s Control Panel and search for “Cloudflare Email”. Then click on the “Install” button in its modal window.

#### With Composer

[](#with-composer)

```
cd /path/to/my-project.test
composer require reusser/cloudflare-email
./craft plugin/install cloudflare-email
```

Prerequisites
-------------

[](#prerequisites)

Before installing this plugin, onboard your sending domain in Cloudflare following Cloudflare's official guide:

➡️ [**Get started with Cloudflare Email Sending**](https://developers.cloudflare.com/email-service/get-started/send-emails/)

That walks you through enabling Email Sending on a domain, adding the required SPF/DKIM/DMARC records, and finding your Account ID and API token.

Setup
-----

[](#setup)

1. Create a Cloudflare API token with the **Email Sending** permission scoped to your account. You can do this from your Cloudflare dashboard under **My Profile → API Tokens → Create Token → Custom token**.
2. In Craft, go to **Settings → Email**.
3. Set the **Transport Type** to **Cloudflare Email**.
4. Enter your **Account ID** and **API Token**.
5. Save and send a test email.

### Environment variables (recommended)

[](#environment-variables-recommended)

Both fields support environment variables. Add the following to your `.env` file:

```
CLOUDFLARE_ACCOUNT_ID="your-account-id"
CLOUDFLARE_API_TOKEN="your-api-token"

```

Then enter `$CLOUDFLARE_ACCOUNT_ID` and `$CLOUDFLARE_API_TOKEN` in the corresponding settings fields.

> See [Environmental Configuration](https://craftcms.com/docs/5.x/configure.html#environment-overrides) in the Craft docs for more on environment variables.

How it works
------------

[](#how-it-works)

Mail is sent via Cloudflare’s API:

```
POST https://api.cloudflare.com/client/v4/accounts/{account_id}/email/sending/send
Authorization: Bearer {token}
Accept: application/json

```

The transport translates Symfony’s `Email` object into Cloudflare’s expected JSON payload, including support for:

- `from`, `to`, `cc`, `bcc`, `reply_to`
- HTML and plain-text bodies
- Custom headers
- Attachments (base64-encoded)

Errors returned by Cloudflare are surfaced as Symfony `TransportException`s.

Troubleshooting
---------------

[](#troubleshooting)

- **`invalid_request_schema` errors** — the most common cause is an unverified sender domain or an address that isn’t allowed by your Cloudflare Email Sending configuration.
- **401 Unauthorized** — verify the API token has the **Email Sending** permission and is scoped to the correct account.
- **No emails arriving** — check Cloudflare’s Email Sending dashboard for delivery and bounce status.

Development
-----------

[](#development)

```
composer test         # run Pest tests
composer phpstan      # static analysis
composer format       # apply Pint formatting
composer check-format # CI-friendly format check
```

License
-------

[](#license)

[MIT](LICENSE.md)

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance94

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

26d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/61243fe9ca8ecdca0d8e592450b48947f1d1cafbbdcf8c851298bb11c0af1c4a?d=identicon)[reusserdesign](/maintainers/reusserdesign)

---

Top Contributors

[![adrum](https://avatars.githubusercontent.com/u/1464185?v=4)](https://github.com/adrum "adrum (4 commits)")

---

Tags

emailmailercmsyii2cloudflarecraftcms

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/reusser-craft-cloudflare-email/health.svg)

```
[![Health](https://phpackages.com/badges/reusser-craft-cloudflare-email/health.svg)](https://phpackages.com/packages/reusser-craft-cloudflare-email)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M195](/packages/sulu-sulu)[craftcms/mailgun

Mailgun integration for Craft CMS

27227.4k8](/packages/craftcms-mailgun)[craftcms/postmark

Postmark adapter for Craft CMS

20188.4k4](/packages/craftcms-postmark)[craftpulse/craft-notifications

Send notifications across a variety of delivery channels, including mail and Slack. Notifications may also be stored in a database so they may be displayed in your web interface.

551.3k](/packages/craftpulse-craft-notifications)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
