• Stars
    star
    2,009
  • Rank 22,875 (Top 0.5 %)
  • Language Vue
  • License
    MIT License
  • Created about 1 year ago
  • Updated 11 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

CloudFlare free temp domain email 免费收发 临时域名邮箱 支持附件 IMAP SMTP TelegramBot

使用 cloudflare 免费服务,搭建临时邮箱

English

在线演示

功能/TODO

  • Cloudflare D1 作为数据库
  • 使用 Cloudflare Pages 部署前端
  • 使用 Cloudflare Workers 部署后端
  • email 转发使用 Cloudflare Email Routing
  • 使用 password 重新登录之前的邮箱
  • 免费版附件过大会造成 Exceeded CPU Limit 错误

什么是临时邮箱

临时邮箱,也被称为一次性邮箱或临时邮件地址,是一种用于临时接收邮件的虚拟邮箱。与常规邮箱不同,临时邮箱旨在提供一种匿名且临时的邮件接收解决方案。

临时邮箱往往由网站或在线服务提供商提供,用户可以在需要注册或接收验证邮件时使用临时邮箱地址,而无需暴露自己的真实邮箱地址。这样做的好处是可以保护个人隐私


Cloudflare 服务

  • D1Cloudflare 的原生无服务器数据库。
  • PagesCloudflare 的静态网站托管服务, 速度超快,始终保持最新状态。
  • WorkersCloudflareserverless 应用服务,可以在全球 300 个数据中心运行代码, 而无需配置或维护基础架构。
  • Cloudflare Email Routing 可以处理域名的所有电子邮件流量,而无需管理电子邮件服务器。

wrangler 的安装

安装 wrangler

npm install wrangler -g

克隆项目

git clone https://github.com/dreamhunter2333/cloudflare_temp_email.git

D1 数据库

第一次执行登录 wrangler 命令时,会提示登录, 按提示操作即可

# 创建 D1 并执行 schema.sql
wrangler d1 create dev
wrangler d1 execute dev --file=db/schema.sql

创建完成后,我们在 cloudflare 的控制台可以看到 D1 数据库

D1


Cloudflare workers 后端

初始化项目

cd worker
pnpm install
cp wrangler.toml.template wrangler.toml

修改 wrangler.toml 文件

name = "cloudflare_temp_email"
main = "src/worker.js"
compatibility_date = "2023-08-14"
node_compat = true

[vars]
PREFIX = "tmp" # 要处理的邮箱名称前缀
DOMAIN = "xxx.xxx" # 你的域名
JWT_SECRET = "xxx" # 用于生成 jwt 的密钥
BLACK_LIST = "" # 黑名单,用于过滤发件人,逗号分隔

[[d1_databases]]
binding = "DB"
database_name = "xxx" # D1 数据库名称
database_id = "xxx" # D1 数据库 ID

Cloudflare Workers 后端

部署

pnpm run deploy

部署成功之后再路由中可以看到 workerurl,控制台也会输出 workerurl

worker


Cloudflare Email Routing

配置 Cloudflare Email Routing catch-all 发送到 worker

email


Cloudflare Pages 前端

cd frontend
pnpm install
cp .env.example .env.local

修改 .env.local 文件, 将 VITE_API_BASE 修改为 workerurl, 不要在末尾加 /

例如: VITE_API_BASE=https://xxx.xxx.workers.dev

pnpm build --emptyOutDir
# 根据提示创建 pages
pnpm run deploy

pages

参考资料

More Repositories

1

python_PlateRecogntion

python opencv 车牌识别 PlateRecogntion
Python
530
star
2

chatgpt-tarot-divination

AI 算命,占卜,塔罗牌,姓名五格,周公解梦,生辰八字,梅花易数
Python
359
star
3

python_car

python opencv 车牌识别
Python
29
star
4

chatgpt_reverse_proxy

Chatgpt reverse proxy based on Browser
Python
26
star
5

Shinelon_YAO_7000_efi

Shinalon YAO 7000 efi hackintosh
Shell
12
star
6

Lenovo_G40_70M_EFI

Lenovo_G40_70M HACKINTOSH EFI
ASL
11
star
7

HP_Probook_440_G6_EFI

11
star
8

weibo-awsl-vue

Vue
10
star
9

ikun-whacamole

打地鼠 - 鸡你太美 ikun 版
Python
9
star
10

clouldflare-free-ai

JavaScript
8
star
11

yunpan

python3 fastapi 实现的简易网盘,支持流媒体播放
Vue
8
star
12

moyuban

Vue
7
star
13

python_faceunlock

Python 人脸解锁登录
Python
5
star
14

fans_count_history

Vue
4
star
15

notes

Dockerfile
4
star
16

java-tetris

Java Tetris 俄罗斯方块
Java
4
star
17

flutter-awsl

Dart
4
star
18

playground-python

playground-python use pyodide + cloudflare pages
HTML
4
star
19

awsl-auth

注册登录系统,支持Google, Outlook, Github, MetaMask
Python
3
star
20

pyredis

使用 python 实现的 key-value 数据库
Python
3
star
21

android_sql

安卓数据库查询 demo
Java
3
star
22

leetcode_practise

leetcode 练习
Python
3
star
23

iqiyi_danmu

Decompress and decode iqiyi danmu
Python
2
star
24

docker-trojan-go

docker trojan go
Shell
2
star
25

openai-proxy

openai proxy 代理 openai, 分发私有 api_key 并计费
Go
2
star
26

GenshinMidiPlayer

GenshinMidiPlayer 原神 MiDi 弹琴
Python
2
star
27

vendor_apps_MiuiCamera

Makefile
1
star
28

flyme6-device-oneplus3

Smali
1
star
29

weibo-awsl

Python
1
star
30

python_face

Python 人脸对比识别 调用百度api进行人脸识别
Python
1
star
31

HP_ENVY_13_EFI

HP ENVY13 ENVY 13 EFI HACKINTOSH
Rich Text Format
1
star
32

gpt_tools

Python
1
star
33

ibc-app-solidity

JavaScript
1
star