Swoosh adapter for Cloudflare Email Service REST API.
Configuration
config :my_app, MyApp.Mailer,
adapter: Swoosh.Adapters.Cloudflare,
api_token: System.get_env("CLOUDFLARE_EMAIL_TOKEN"),
account_id: System.get_env("CLOUDFLARE_ACCOUNT_ID")Success response
deliver/2 returns {:ok, %{delivered: [...], permanent_bounces: [...], queued: [...]}}.
Error responses
deliver/2 returns {:error, {status, reason}} for most errors, and
{:error, {429, :rate_limited, retry_after_seconds}} for rate limiting,
where retry_after_seconds is an integer or nil if the header was absent.
Limitations
- New accounts can only send to verified addresses. Paid plans unlock general sending.
- The
fromaddress must belong to a domain with Email Routing active in the Cloudflare account. - Maximum 50 recipients per email (combined to/cc/bcc).
- Maximum message size: 5 MiB (25 MiB for verified accounts).
- Transactional email only — bulk/marketing sending is not supported.
Summary
Functions
Callback implementation for Swoosh.Adapter.validate_config/1.
Callback implementation for Swoosh.Adapter.validate_dependency/0.
Functions
Callback implementation for Swoosh.Adapter.validate_config/1.
Callback implementation for Swoosh.Adapter.validate_dependency/0.