Cloudflare Email + Better-Notify
Use Cloudflare's Email Routing Service to send transactional email at the edge. No SMTP servers to manage — just an API token and your Cloudflare account.
Install
npm install @betternotify/cloudflare-emailQuick start
import { createClient } from '@betternotify/core';
import { cloudflareEmailTransport } from '@betternotify/cloudflare-email';
const mail = createClient({
catalog,
transportsByChannel: {
email: cloudflareEmailTransport({
accountId: process.env.CF_ACCOUNT_ID,
apiToken: process.env.CF_API_TOKEN,
}),
},
});
await mail.welcome.send({ to: 'user@example.com', input: { name: 'Alice' } });Features
- Edge-native email delivery
- No SMTP infrastructure needed
- Cloudflare API token auth
- Attachments and CC/BCC
- Comprehensive error code mapping