Skip to content
Projects

roseforyou/cf-outlook-email

View on GitHub

About

📬 基于 Cloudflare Workers 的轻量级 Outlook 邮件管理工具 · 免费 · 无需服务器 | Lightweight Outlook email manager, serverless & free ⚡

Productivity & Automation

How these counts are measured

Measured star growth

in 24h
0
in 7 days
+3
in 15 days
+3
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README_EN.md

Original

📬 Outlook Email Manager

Lightweight Outlook email manager powered by Cloudflare Workers

🆓 100% Free · ☁️ No Server Required · 🌍 Global CDN · 🌗 Dark/Light Theme · 🌐 Bilingual UI

License: GPL-3.0 TypeScript Cloudflare Workers Hono D1 PRs Welcome

Deploy to Cloudflare

⚠️ This button cannot one-click deploy this project: it relies on a D1 database and Secrets, which require manually creating the DB, running migrations, and setting secrets — the button fails at framework detection. Please follow the 📖 Deployment Guide instead (~5 min).

🌐 中文 · 📖 Deployment Guide · 🔌 API Docs


🌙 Dark ☀️ Light
Dark mode Light mode

✨ Features

  • 🔐 One-Click OAuth — Authorize Outlook accounts via browser popup, no manual token copying
  • 🔄 Auto Token Refresh — Automatically saves new refresh tokens on each use, preventing expiry
  • 📦 Batch Operations — Import/export/delete/move in bulk, including per-row & selected export, with group & status filters
  • 📨 Email Reading — Read inbox / junk / deleted via Microsoft Graph API with folder switching, aggregated view, paginated load-more, search and HTML rendering
  • 📭 Temp Email — GPTMail API integration for disposable email addresses
  • 🎨 Polished Themes — Dark / Light / Auto with glassmorphism, circle-swoop transition & ambient breathing glow
  • 🌐 Bilingual UI — Chinese by default, one-click switch to English in the topbar, preference remembered locally, backend messages translated on display
  • 🆓 Completely Free — Runs on Cloudflare's free tier, no credit card needed

🚀 Quick Deploy

💡 See the Deployment Guide for full steps.

# 1. Clone & install
git clone https://github.com/roseforyou/cf-outlook-email.git
cd cf-outlook-email
pnpm install

# 2. Login to Cloudflare
pnpm exec wrangler login

# 3. Create D1 database (copy database_id to wrangler.toml)
pnpm exec wrangler d1 create outlook-email-db
cp wrangler.toml.example wrangler.toml
# Edit wrangler.toml, replace REPLACE_WITH_YOUR_DATABASE_ID

# 4. Set secrets
pnpm exec wrangler secret put ADMIN_PASSWORD
pnpm exec wrangler secret put COOKIE_SECRET

# 5. Initialize & deploy
pnpm exec wrangler d1 migrations apply outlook-email-db --remote
pnpm exec wrangler deploy

Visit the output URL and login with your password. 🎉

📮 Adding Accounts

Login → Add Account → One-Click Auth → Microsoft login popup → Authorize → Credentials auto-filled → Save.

Works with all Outlook / Hotmail / Live accounts. Bulk import supported (format: email----password----client_id----refresh_token).

🧱 Tech Stack

Layer Technology
⚙️ Runtime Cloudflare Workers (TypeScript)
🧭 Router Hono
🗄️ Database Cloudflare D1 (SQLite)
🎨 Frontend Vanilla HTML/CSS/JS
📧 Email Microsoft Graph API
🚀 Deploy Wrangler

💰 Free Tier Limits

Resource Free Quota Sufficient?
⚡ Worker Requests 100K/day ✅
⏱️ CPU Time 10ms/req ✅
🌐 Subrequests 50/req ✅ (single account per request)
💾 D1 Storage 5 GB ✅

🗺️ Roadmap

Core features (implemented)

  • 🔐 One-click OAuth & auto token refresh
  • 👤 Account management (CRUD, connection test)
  • 🗂️ Group management (custom colors, group & status filters)
  • 📦 Bulk import / export / delete / move
  • 📤 Per-row & selected export
  • 📨 Email reading (live fetch, search, HTML rendering)
  • 📁 Folder switching (Inbox / Junk / Deleted)
  • 🔀 Aggregated view (Inbox + Junk merged by time — great for finding codes)
  • 📄 Paginated load-more
  • 📭 Temp email (GPTMail integration)
  • 🎨 Theme switching + circle-swoop transition + breathing glow
  • 🔑 External API + API Key (login-free email fetch for automation, see API Docs)
  • 🗑️ Delete emails (single / batch, soft-delete to Deleted Items)
  • 📎 Attachment download
  • 🏷️ Tag system (multiple tags per account, cross-group filtering)
  • ⏰ Scheduled token refresh (Cron Trigger, configurable interval/batch, keeps accounts alive)
  • 🤖 Telegram push for new emails (cron polling, near-real-time delivery, configurable interval)
  • 🧭 UI polish (per-page toolbars, dashboard health cards, responsive settings grid, paginated accounts table, searchable account combobox)
  • 🌐 UI internationalization (Chinese default, one-click English)

Planned (PRs welcome)

  • 🔔 More push channels (WeCom / DingTalk etc.)

⚠️ Due to Cloudflare Workers platform limits, the following are not feasible: IMAP (Gmail / QQ / 163 and other non-Microsoft mailboxes), SMTP forwarding, HTTP/SOCKS5 proxy.

⚠️ Disclaimer

This project is intended for personal use to manage your own email accounts. Ensure you have legal authorization for all accounts you manage. The default Client ID is Mozilla Thunderbird's public ID for quick setup only — registering your own Azure app is recommended for production use. The author assumes no liability for any misuse.

🙏 Credits

This project is a rewrite of xiaozhi349/outlookEmail, originally built with Python Flask + SQLite. It has been migrated to Cloudflare Workers + D1 with a completely new frontend and backend. Thanks to the original author.

📜 License

License: GPL-3.0

Licensed under GPL-3.0. Free to use, modify, and distribute — but any distributed derivative must also be open-sourced under GPL-3.0 with full source code.

Explore related projects

Loading…