---
name: bijection-cloudflare-email-sending
description: "Evaluate and integrate the Cloudflare Email Sending component with Bijection."
---

# Cloudflare Email Sending

A Bijection component for durable transactional email sending through Cloudflare Email Service.

- Package: @bijectionhq/cloudflare-email-sending
- Category: Integrations
- Status: Preview
- License: Apache-2.0
- Bijection source (repository access required): https://github.com/bijectionhq/cloudflare-email-sending/tree/1f1023a19e5b66a45cb62cc6bc0ca59d6edb06bf
- Upstream: https://github.com/ezyyeah/cloudflare-email-sending/tree/ecd56ba4e6da0cb528c44fb45c63bd8ada2fa3b7
- Documentation: https://docs.bijection.com/components/using
- Directory: https://bijection.com/components/cloudflare-email-sending

## Get the source

Bijection repository access is required. Request access at https://bijection.com/contact.

```sh
git clone https://github.com/bijectionhq/cloudflare-email-sending.git
cd cloudflare-email-sending
git checkout 1f1023a19e5b66a45cb62cc6bc0ca59d6edb06bf
```

## Before using this component

Read the package README at the recorded revision for setup, dependencies, and API examples. Upstream documentation describes the original package and may differ from the Bijection adaptation. This is a source candidate for evaluation. Catalog inclusion does not establish npm availability or runtime qualification. Check compatibility with your SDK and deployment before adoption. External providers run their own compute.

## Integration workflow

1. Read the source README and package manifest at the recorded revision.
2. Confirm the required SDK, dependency availability, and runtime compatibility.
3. Follow the component's documented setup and configuration. Never invent an npm install command from a catalog package name.
4. Keep credentials in the project's existing secret store.
5. Follow the project's execution rules for verification and report what was actually checked.

## Original upstream skill

The following guidance describes @ezyyeah/cloudflare-email-sending. Its installation commands and APIs refer to the upstream package. Evaluate compatibility with the Bijection source separately.


# Cloudflare Email Sending

## Instructions

Use Cloudflare Email Sending to queue-based transactional email sending for convex apps using cloudflare email service with automatic retries, status tracking, and file attachments. This Convex component integrates directly with your backend.

### Installation

```bash
npm install @ezyyeah/cloudflare-email-sending
```

### Capabilities

- Send emails reliably with automatic exponential backoff retries for network failures and rate limits
- Track email status and handle failures gracefully with built-in queue management and cancellation
- Attach files from Convex storage or base64 content with automatic size validation
- Integrate transactional emails into Convex actions with idempotency key support

## Examples

### how to send transactional emails from Convex with retry logic

Use the Cloudflare Email Sending component to queue emails in Convex actions with automatic retries. The component validates requests, handles exponential backoff for failures, and returns an email ID for status tracking.

### send email with attachments in Convex application

The component supports attachments from Convex storage IDs or base64 content. It automatically resolves storage files and validates the total message size against Cloudflare's 25 MiB limit before sending.

### track email delivery status in Convex

Call getStatus() with the returned email ID to check states like queued, sending, processed, or failed. The component provides acceptance-level tracking and supports cancellation of queued emails.

### prevent duplicate emails in Convex with idempotency

Use idempotencyKey in the send request to prevent duplicate emails. The component returns the existing email ID for identical payloads or throws IdempotencyConflictError for different content with the same key.

## When NOT to use

- When a simpler built-in solution exists for your specific use case
- If you are not using Convex as your backend
- When the functionality provided by Cloudflare Email Sending is not needed

## Troubleshooting

**What Cloudflare setup is required before using this component?**

The Cloudflare Email Sending component requires your domain added to Cloudflare DNS, onboarding through the Email Sending dashboard, and waiting for SPF, DKIM, and DMARC DNS propagation. You also need a Cloudflare account ID and API token configured in Convex environment variables.

**Does this component guarantee email delivery to inboxes?**

No, the Cloudflare Email Sending component provides acceptance-level tracking only. The 'processed' status means Cloudflare accepted the request, not that the email reached the recipient's inbox. Webhook-driven delivery tracking is not currently implemented.

**How does retry logic work for failed emails?**

The Cloudflare Email Sending component uses exponential backoff with deterministic jitter for retryable failures including network errors, 429 rate limits, and 5xx server errors. Default configuration attempts 5 retries with backoff from 30 seconds to 30 minutes maximum.

**Can I send bulk or marketing emails with this component?**

The Cloudflare Email Sending component is designed for transactional emails only. It enforces a maximum of 50 recipients per message and focuses on reliable delivery of individual user-triggered emails rather than bulk marketing campaigns.

**What file types can be attached to emails?**

The Cloudflare Email Sending component supports any file type as attachments, either from Convex storage IDs or base64 encoded content. It validates the total message size stays within Cloudflare's 25 MiB limit and rejects empty filenames or unreadable storage references.

## Resources

- [npm package](https://www.npmjs.com/package/%40ezyyeah%2Fcloudflare-email-sending)
- [GitHub repository](https://github.com/ezyyeah/cloudflare-email-sending)
- [Live demo](https://github.com/ezyyeah/cloudflare-email-sending/tree/main/example)
- [Convex Components Directory](https://www.convex.dev/components/ezyyeah/cloudflare-email-sending)
- [Convex documentation](https://docs.convex.dev)