Skip to content

Latest commit

 

History

History
81 lines (61 loc) · 4.25 KB

README_en.md

File metadata and controls

81 lines (61 loc) · 4.25 KB

Temp mail service with Cloudflare Workers


ANONS.EMAIL


English | 中文文档

All tools just using Cloudflare service

Website preview

image

前期准备

  1. Set up a Cloudflare account.
  2. Host your domain on Cloudflare.
  3. Create a brand new Workers.
  4. Establish a kv namespace, and make note of its ID for later use.
  5. Install the wrangle environment locally and log in:
npm install wrangler@latest --save-dev
npx wrangler login
  1. Connect your computer with Workers and execute the following command:
npx wrangler init --from-dash [Workers name]

Replace [Workers name] with the name of your workers, for example, in the following image, it is "temp-mail".

image

Deployment

  1. Copy the git repository:
git clone https://github.com/gohcx/temporary-email-service.git
cd ./temporary-email-service
  1. Copy files to the wrangler environment.
  2. Edit wrangler.toml
Function Description Example required
routes Import the service's URLs here. routes = [ { pattern = "anons.email", custom_domain = true }] NO
kv_namespace Service needed for email storage (binding must be kv4email) kv_namespaces = [{ binding = "kv4email", id = "xxxxxxxxxx" }] YES
website_name Website name, will appear in the navigation bar. Anonymous mail YES
email_domain Available domain choices. '["anons.email", "example.com"]' YES
contact_email Contact email [email protected] YES
abuse_email Abuse report email [email protected] YES
custom_email_domain Custom email domain '["ct.anons.email"]' YES
dropMail_email Portion for deleting emails [email protected] YES
  1. Connect the website to Workers, Redirect,as shown below:

image

  1. Enable Catch-all address address mode and point it to Workers as the email recipient.
  2. In the custom email section, set the email within the function dropMail_email in wrangler.toml to (DELETE/DROP).
  3. To add other domains, go to Subdomain, find the subdomain, and create it.
  4. Upload the code to Workers.
npx wrangler deploy

Star History

Please support me thanks ( > u < ) _/ Star Rating

Sponser

sponser

Inspired By