PHPackages                             sohaibilyas/laravel-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. sohaibilyas/laravel-cloudflare-email

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

sohaibilyas/laravel-cloudflare-email
====================================

A Cloudflare Email Service mail transport for Laravel.

v1.0.1(1mo ago)02MITPHPPHP ^8.2

Since Jul 4Pushed 1mo agoCompare

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

READMEChangelog (2)Dependencies (10)Versions (3)Used By (0)

Laravel Cloudflare Email
========================

[](#laravel-cloudflare-email)

A Laravel mail transport for sending transactional mail through [Cloudflare Email Service](https://developers.cloudflare.com/email-service/).

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

[](#installation)

```
composer require sohaibilyas/laravel-cloudflare-email
```

Configuration
-------------

[](#configuration)

Enable Email Sending for your domain in Cloudflare, then add your account ID and API token to `.env`:

```
CLOUDFLARE_ACCOUNT_ID=your-account-id
CLOUDFLARE_EMAIL_TOKEN=your-api-token
```

You may also pass the full authorization header value:

```
CLOUDFLARE_EMAIL_TOKEN="Bearer your-api-token"
```

The package automatically registers a `cloudflare-email` Laravel mailer. Set it as your default mailer:

```
MAIL_MAILER=cloudflare-email
MAIL_FROM_ADDRESS=noreply@example.com
MAIL_FROM_NAME="${APP_NAME}"
```

Laravel 13 includes its own native `cloudflare` mail transport. This package intentionally uses `cloudflare-email` so it does not collide with Laravel's built-in driver. It is most useful for Laravel 11 and 12 projects where Cloudflare Email is not available by default, or for apps that want this package's explicit REST transport behavior.

Publishing the config file is optional. Use it only when you want the Cloudflare Email package config in your app:

```
php artisan vendor:publish --tag=cloudflare-email-config
```

If you prefer to configure Cloudflare Email inside Laravel's mail config instead, you may add a `cloudflare-email` entry to `config/mail.php`:

```
'mailers' => [
    'cloudflare-email' => [
        'transport' => 'cloudflare-email',
        'account_id' => env('CLOUDFLARE_ACCOUNT_ID'),
        'token' => env('CLOUDFLARE_EMAIL_TOKEN'),
        'timeout' => env('CLOUDFLARE_EMAIL_TIMEOUT', 30),
    ],
],
```

Usage
-----

[](#usage)

Use Laravel's mail API as usual:

```
use App\Mail\WelcomeMail;
use Illuminate\Support\Facades\Mail;

Mail::to('info@example.com')->send(new WelcomeMail);
```

The transport sends requests to:

```
https://api.cloudflare.com/client/v4/accounts/{account_id}/email/sending/send

```

Cloudflare Email Service requires the `MAIL_FROM_ADDRESS` domain to be enabled for Email Sending in your Cloudflare account.

Testing
-------

[](#testing)

```
composer test
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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

Every ~0 days

Total

2

Last Release

48d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7788998?v=4)[Sohaib Ilyas](/maintainers/sohaibilyas)[@sohaibilyas](https://github.com/sohaibilyas)

---

Top Contributors

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

---

Tags

laravelmailemailtransportcloudflare

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sohaibilyas-laravel-cloudflare-email/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[api-platform/laravel

API Platform support for Laravel

58190.1k21](/packages/api-platform-laravel)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)

PHPackages © 2026

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