# email

Transactional email delivery: responsibilities, supported exports and extension points.

## Purpose [#purpose]

Server transports select the Cloudflare binding, Cloudflare REST, Resend or the console fallback from available configuration. Templates are React Email: typed documents drawn by one layout of React Email components, rendered on the server only and synchronously to HTML and a plain-text part, in English, German and French, for verification, welcome, reset, the security notice and invitations.

## Public exports [#public-exports]

| Subpath        | Target                |
| -------------- | --------------------- |
| `.`            | `./src/index.ts`      |
| `./request`    | `./src/request.ts`    |
| `./templates`  | `./src/templates.ts`  |
| `./transports` | `./src/transports.ts` |

These paths come from `packages/email/package.json`. A `.` entry is the package root. Conditional targets distinguish platform or type resolution; consumers should import the subpath, not its source file.

## How to extend [#how-to-extend]

Add a template (a document in `templates.ts`, its copy in `src/locales/{en,de,fr}.ts`, a preview in `emails/`; `pnpm email:dev` shows it live on port 3060) and call the existing send boundary. Delivery has a bounded timeout and does not automatically retry a send after an uncertain response. Configure a real provider before relying on user delivery.

Read the [transactional email delivery guide](/docs/features/email) for the full flow.

## Key files [#key-files]

- [`packages/email/package.json`](https://github.com/CarlosZiegler/template-cloudflare/blob/main/packages/email/package.json)

