Skip to content

hbmartin/cloudflare-email-worker-sqlite

 
 

Repository files navigation

Cloudflare email worker to SQLite D1

GitHub license Checked with Biome Lint and Test

Send emails to Cloudflare and store them in SQLite (D1).

Setup

Prerequisites

Install dependencies

yarn install

Setup database

  • Setup a D1 database
  • Export the environment variables CF_EMAIL_DB_ID and CF_EMAIL_DB_NAME with the database ID and name from previous step.

Deploy the worker

wrangler publish

Set up a route

  • Go to your zone's Email Workers settings.
  • Click the zone (e.g. example.com), then Email, Email Routing.
  • On the Email Workers tab, register an email route.

Register an email route

Verify

  • Send an email to the email address you registered.
  • Check the channel you registered the webhook to.

License

This package is MIT licensed.

About

Lightweight tool to process emails directly from Cloudflare

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 92.2%
  • Shell 5.3%
  • JavaScript 2.5%