承接 reusser/craft-cloudflare-email 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

reusser/craft-cloudflare-email

Composer 安装命令:

composer require reusser/craft-cloudflare-email

包简介

Cloudflare Email Sending integration for Craft CMS

README 文档

README

Cloudflare Email for Craft CMS icon

Cloudflare Email for Craft CMS

This plugin provides a Cloudflare Email Sending integration for Craft CMS.

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

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

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

Prerequisites

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

➡️ Get started with Cloudflare Email Sending

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

  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)

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 in the Craft docs for more on environment variables.

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 TransportExceptions.

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

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

License

MIT

reusser/craft-cloudflare-email 适用场景与选型建议

reusser/craft-cloudflare-email 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 05 月 14 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「mailer」 「email」 「cms」 「cloudflare」 「yii2」 「craftcms」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 reusser/craft-cloudflare-email 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 reusser/craft-cloudflare-email 我们能提供哪些服务?
定制开发 / 二次开发

基于 reusser/craft-cloudflare-email 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 55
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-14