### Install Dependencies and Configure Environment Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/cli/pages.md Navigate to the frontend directory, install dependencies using pnpm, and copy the example environment file for production. Modify the VITE_API_BASE variable to point to your worker's URL. ```bash cd frontend pnpm install cp .env.example .env.prod ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/frontend/README.md Run this command to install all necessary project dependencies. ```sh npm install ``` -------------------------------- ### Install Worker Dependencies and Deploy Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/cli.md Navigates to the worker directory, installs dependencies using pnpm, copies the template configuration, and deploys the worker. ```bash cd worker pnpm install cp wrangler.toml.template wrangler.toml pnpm run deploy ``` -------------------------------- ### Run SMTP Proxy Server Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/CLAUDE.md Starts the Python SMTP proxy server. Ensure dependencies are installed first. ```bash python smtp_proxy_server/main.py ``` -------------------------------- ### Frontend Deployment Steps Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/cli.md Steps to install dependencies, configure environment variables, build, and deploy the frontend application. ```bash cd frontend pnpm install # add .env.local and modify VITE_API_BASE to your worker's url # VITE_API_BASE=https://xxx.xxx.workers.dev - don't put / in the end cp .env.example .env.local pnpm build --emptyOutDir pnpm run deploy ``` -------------------------------- ### Run Development Server Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/frontend/README.md Use this command to compile and start the development server with hot-reloading. ```sh npm run dev ``` -------------------------------- ### Install cf-temp-mail-agent-mail Skill Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/feature/agent-email.md Provides three methods to install the agent skill: using `npx skills` (recommended), `npx degit`, or by cloning the repository and copying the skill directory. ```bash # Option 1: npx skills (recommended, auto-detects multiple agents) npx skills add dreamhunter2333/cloudflare_temp_email --skill cf-temp-mail-agent-mail # Add -g to install globally npx skills add dreamhunter2333/cloudflare_temp_email --skill cf-temp-mail-agent-mail -g # Option 2: npx degit to copy into your agent's skills folder npx degit dreamhunter2333/cloudflare_temp_email/skills/cf-temp-mail-agent-mail /cf-temp-mail-agent-mail # Option 3: clone and copy git clone --depth 1 https://github.com/dreamhunter2333/cloudflare_temp_email.git /tmp/cf-temp-mail cp -r /tmp/cf-temp-mail/skills/cf-temp-mail-agent-mail / ``` -------------------------------- ### Install mail-parser-wasm Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/mail-parser-wasm/README.md Install the mail-parser-wasm package using pnpm. ```bash pnpm add mail-parser-wasm ``` -------------------------------- ### SMTP/IMAP Proxy Configuration Example Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/worker-vars.md Example JSON configuration for setting up SMTP and IMAP proxy details. This is used for displaying connection information in the frontend. ```json { "smtp": { "host": "smtp.example.com", "port": 8025, "starttls": true }, "imap": { "host": "imap.example.com", "port": 11143, "starttls": true } } ``` -------------------------------- ### Initialize Cloudflare Worker Project Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/cli/worker.md Navigate to the worker directory, install dependencies, and copy the template configuration file. ```bash cd worker pnpm install cp wrangler.toml.template wrangler.toml ``` -------------------------------- ### Install Dependencies and Deploy Telegram Mini App Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/feature/telegram.md Install frontend dependencies, copy the production environment file, and set the VITE_IS_TELEGRAM variable to true for deploying the Telegram mini app via the command line. ```bash cd frontend pnpm install cp .env.example .env.prod # Edit .env.prod and set VITE_IS_TELEGRAM=true # --project-name can create a separate pages for mini app, you can also share one pages, but may encounter js loading issues pnpm run deploy:telegram --project-name= ``` -------------------------------- ### Install mail-parser-wasm-worker Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/mail-parser-wasm/README.md Install the mail-parser-wasm-worker package using pnpm. ```bash pnpm add mail-parser-wasm-worker ``` -------------------------------- ### Install SMTP Proxy Dependencies Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/CLAUDE.md Installs the required Python packages for the SMTP proxy server. This command should be run from the `smtp_proxy_server/` directory. ```bash pip install -r smtp_proxy_server/requirements.txt ``` -------------------------------- ### Install Wrangler CLI Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/cli/pre-requisite.md Installs the Wrangler CLI globally using npm. This tool is required for deploying Cloudflare Workers. ```bash npm install wrangler -g ``` -------------------------------- ### Send Mail Domains Configuration Example Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/worker-vars.md Example JSON array for restricting sender domains that can use the SEND_MAIL binding. If unset or empty, all domains are permitted. ```json ["example.com", "mail.example.com"] ``` -------------------------------- ### Install Email Parsing Libraries Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/skills/cf-temp-mail-agent-mail/SKILL.md Install the necessary npm packages for parsing email content, mail-parser-wasm and postal-mime. ```bash npm i mail-parser-wasm postal-mime ``` -------------------------------- ### Build and Deploy Frontend for Page Functions Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/cli/pages.md Install dependencies, build the frontend specifically for Cloudflare Pages deployment (potentially disabling caching if Zero Trust is enabled), and then deploy the pages project. Ensure the worker backend name matches the wrangler.toml configuration. ```bash cd frontend pnpm install # If you want to enable Cloudflare Zero Trust, you need to use pnpm build:pages:nopwa to disable caching pnpm build:pages cd ../pages pnpm run deploy ``` -------------------------------- ### Agent Skill Integration Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/feature/agent-email.md Instructions on how to install and use the `cf-temp-mail-agent-mail` skill, which wraps the email management flow for use with AI agents. ```APIDOC ## cf-temp-mail-agent-mail Skill ### Description This repository includes an agent skill located at `skills/cf-temp-mail-agent-mail/` that provides an interface for interacting with the Cloudflare Temporary Email API. It is compatible with agents like Claude Code, Cursor, Codex, and OpenClaw. ### Installation Methods **Option 1: Using `npx skills` (Recommended)** Automatically detects and installs the skill for multiple agents. ```bash # Install for the current project npx skills add dreamhunter2333/cloudflare_temp_email --skill cf-temp-mail-agent-mail # Install globally npx skills add dreamhunter2333/cloudflare_temp_email --skill cf-temp-mail-agent-mail -g ``` **Option 2: Using `npx degit`** Copies the skill directly into your agent's skills directory. ```bash npx degit dreamhunter2333/cloudflare_temp_email/skills/cf-temp-mail-agent-mail /cf-temp-mail-agent-mail ``` **Option 3: Clone and Copy** Manually clone the repository and copy the skill directory. ```bash git clone --depth 1 https://github.com/dreamhunter2333/cloudflare_temp_email.git /tmp/cf-temp-mail cp -r /tmp/cf-temp-mail/skills/cf-temp-mail-agent-mail / ``` For more details, refer to the `SKILL.md` file in the skill's directory: [SKILL.md](https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/skills/cf-temp-mail-agent-mail/SKILL.md). ``` -------------------------------- ### Run E2E Tests with Docker Compose Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/e2e/README.md Builds and starts all services, runs the E2E tests, and then stops the services. The exit code indicates test success or failure. ```bash cd e2e # Build, start all services, run tests, and exit npm test # Clean up containers and volumes npm run test:down ``` -------------------------------- ### Example ANOTHER_WORKER_LIST Configuration Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/worker-vars.md Configure other workers to process emails based on keywords. Supports filtering by keywords and calling a bound worker's method. Keywords are required for the worker to be triggered. ```toml #ANOTHER_WORKER_LIST =""" #[ # { # "binding":"AUTH_INBOX", # "method":"rpcEmail", # "keywords":[ # "验证码","激活码","激活链接","确认链接","验证邮箱","确认邮件","账号激活","邮件验证","账户确认","安全码","认证码","安全验证","登陆码","确认码","启用账户","激活账户","账号验证","注册确认", # "account","activation","verify","verification","activate","confirmation","email","code","validate","registration","login","code","expire","confirm" # ] # } #] # ``` -------------------------------- ### Email Format Transformation: Extract Username Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/feature/user-oauth2.md Example of extracting the username from an email address and appending a new domain. ```text ^(.+)@.*$ ``` ```text $1@mymail.com ``` -------------------------------- ### Run SMTP Proxy Server Locally Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/feature/config-smtp-proxy.md Execute the SMTP proxy server locally after installing dependencies. Ensure the .env file is configured with your worker address and desired port. ```bash cd smtp_proxy_server/ # Copy configuration file and modify it # Your worker address, proxy_url=https://temp-email-api.xxx.xxx # Your SMTP service port, port=8025 cp .env.example .env python3 -m venv venv ./venv/bin/python3 -m pip install -r requirements.txt ./venv/bin/python3 main.py ``` -------------------------------- ### Email Format Transformation: ID to Email Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/feature/user-oauth2.md Example of transforming a user ID into an email address using regex and a replacement template. ```text ^(.+)$ ``` ```text linux_do_$1@oauth.linux.do ``` -------------------------------- ### Example SUBDOMAIN_FORWARD_ADDRESS_LIST Configuration Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/worker-vars.md Configure subdomain and rule-based email forwarding. Supports filtering by domain and sender address regex. Regex pattern max length is 200 characters. ```toml SUBDOMAIN_FORWARD_ADDRESS_LIST = """ [ {"domains":[""],"forward":"xxx1@xxx.com"}, {"domains":["subdomain-1.domain.com","subdomain-2.domain.com"],"forward":"xxx2@xxx.com"}, {"domains":["example.com"],"forward":"admin@xxx.com","sourcePatterns":[".*@github.com",".*@gitlab.com"],"sourceMatchMode":"any"} ] """ ``` -------------------------------- ### Send Email via SMTP using Python smtplib Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/feature/send-mail-api.md This example demonstrates sending emails using Python's smtplib library. Ensure SMTP proxy is configured and use the JWT token as the password for login. ```python import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart with smtplib.SMTP('localhost', 8025) as smtp: smtp.login("jwt", "Enter your JWT token password here") message = MIMEMultipart() message['From'] = "Me " message['To'] = "Admin " message['Subject'] = "Test Subject" message.attach(MIMEText("Test Content", 'html')) smtp.sendmail("me@awsl.uk", "admin@awsl.uk", message.as_string()) ``` -------------------------------- ### Batch Create Random Username Email Addresses Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/feature/new-address-api.md This example demonstrates how to programmatically create multiple random email addresses in batches using the Admin API. It utilizes threading for concurrent requests and saves the generated email addresses and their corresponding JWTs to a file. ```APIDOC ## POST /admin/new_address (Batch Creation) ### Description This script generates a specified number of random email addresses and their associated JWTs, saving them to `email.txt`. It uses multithreading to speed up the process. ### Method POST (in a loop) ### Endpoint `https:///admin/new_address` ### Parameters (See 'Create Email Address via Admin API' for individual request parameters. This script generates random names.) ### Headers (See 'Create Email Address via Admin API' for required headers.) ### Request Example (within script) ```python import requests import random import string from concurrent.futures import ThreadPoolExecutor, as_completed def generate_random_name(): letters1 = ''.join(random.choices(string.ascii_lowercase, k=5)) numbers = ''.join(random.choices(string.digits, k=random.randint(1, 3))) letters2 = ''.join(random.choices(string.ascii_lowercase, k=random.randint(1, 3))) return letters1 + numbers + letters2 def fetch_email_data(name): try: res = requests.post( "https:///admin/new_address", json={ "enablePrefix": True, "name": name, "domain": "", }, headers={ 'x-admin-auth': "", "Content-Type": "application/json" } ) if res.status_code == 200: response_data = res.json() email = response_data.get("address", "no address") jwt = response_data.get("jwt", "no jwt") return f"{email}----{jwt}\n" else: print(f"Request failed, status code: {res.status_code}") return None except requests.RequestException as e: print(f"Request error: {e}") return None def generate_and_save_emails(num_emails): with ThreadPoolExecutor(max_workers=30) as executor, open('email.txt', 'a') as file: futures = [executor.submit(fetch_email_data, generate_random_name()) for _ in range(num_emails)] for future in as_completed(futures): result = future.result() if result: file.write(result) # Generate 10 emails and append to existing file generate_and_save_emails(10) ``` ### Response (See 'Create Email Address via Admin API' for individual response details. This script aggregates results into `email.txt`.) ``` -------------------------------- ### Build and Deploy Frontend Assets Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/cli/pages.md Build the frontend application with the --emptyOutDir flag to ensure a clean build, then deploy using the pnpm run deploy command. This process will prompt for project creation if it's the first deployment. ```bash pnpm build --emptyOutDir # The first deployment will prompt you to create a project, for production branch enter production pnpm run deploy ``` -------------------------------- ### Install WASM Mail Parser Worker Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/feature/mail_parser_wasm_worker.md Install the mail-parser-wasm-worker package into your Cloudflare worker project using pnpm. ```bash cd worker pnpm add mail-parser-wasm-worker ``` -------------------------------- ### Initialize D1 Database and Execute Schema Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/cli/d1.md Use these commands to create a new D1 database and apply the initial schema from a SQL file. Ensure you are in the 'worker' directory and have copied 'wrangler.toml.template' to 'wrangler.toml'. ```bash cd worker cp wrangler.toml.template wrangler.toml # Create D1 and execute schema.sql wrangler d1 create temp-email-db wrangler d1 execute temp-email-db --file=../db/schema.sql --remote ``` -------------------------------- ### Build for Production Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/frontend/README.md Execute this command to compile and minify the project for production deployment. ```sh npm run build ``` -------------------------------- ### Create and Initialize D1 Database Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/cli.md Creates a new D1 database instance and executes the SQL schema file to set up the database structure. It also creates a KV namespace. ```bash wrangler d1 create temp-email-db wrangler d1 execute temp-email-db --file=db/schema.sql --remote wrangler kv:namespace create DEV ``` -------------------------------- ### Get Specific Email with cURL Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/skills/cf-temp-mail-agent-mail/SKILL.md Fetch a single parsed email by its ID using a GET request to /api/parsed_mail/:id. Requires the email's unique identifier. ```bash curl -s "$BASE/api/parsed_mail/" -H "Authorization: Bearer $JWT" ``` -------------------------------- ### Upgrade Steps for v0.2.0 Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/CHANGELOG_EN.md Follow these steps to upgrade to version 0.2.0, involving Git checkout, database migration, and deployment of worker and frontend components. ```bash git checkout v0.2.0 cd worker wrangler d1 execute dev --file=../db/2024-04-09-patch.sql --remote pnpm run deploy cd ../frontend pnpm run deploy ``` -------------------------------- ### GET /api/parsed_mail/:id Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/feature/agent-email.md Retrieves a single email from the inbox with parsed content, identified by its ID. ```APIDOC ## GET /api/parsed_mail/:id ### Description Retrieves a single email from the inbox with parsed content, identified by its ID. ### Method GET ### Endpoint /api/parsed_mail/:id ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the email to retrieve. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -s "$BASE/api/parsed_mail/42" -H "Authorization: Bearer $JWT" ``` ### Response #### Success Response (200) - **parsedMail** (object) - Represents a single parsed email (structure is the same as in `/api/parsed_mails` response). #### Response Example ```json { "id": 42, "message_id": "<...>", "source": "noreply@foo.com", "to": "abc@yourdomain.com", "created_at": "2026-04-21 10:00:00", "sender": "Foo ", "subject": "Your code is 123456", "text": "Your code is 123456\n", "html": "

Your code is 123456

", "attachments": [ { "filename": "a.pdf", "mimeType": "application/pdf", "disposition": "attachment", "size": 12345 } ] } ``` ``` -------------------------------- ### Enable STARTTLS with TLS Certificates Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/feature/config-smtp-proxy.md Configure TLS certificate environment variables in the .env file to enable STARTTLS support for SMTP and IMAP. Both services can share the same certificate. ```bash # .env example smtp_tls_cert=/path/to/cert.pem smtp_tls_key=/path/to/key.pem imap_tls_cert=/path/to/cert.pem imap_tls_key=/path/to/key.pem ``` -------------------------------- ### Enable STARTTLS in Docker Compose Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/feature/config-smtp-proxy.md Configure TLS certificate paths within the Docker Compose environment variables and mount the certificates volume for STARTTLS support. ```yaml environment: - smtp_tls_cert=/certs/cert.pem - smtp_tls_key=/certs/key.pem - imap_tls_cert=/certs/cert.pem - imap_tls_key=/certs/key.pem volumes: - ./certs:/certs:ro ``` -------------------------------- ### GET /api/parsed_mails Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/feature/agent-email.md Lists all emails in the inbox with parsed content. Supports pagination using limit and offset. ```APIDOC ## GET /api/parsed_mails ### Description Lists all emails in the inbox with parsed content. Supports pagination using limit and offset. ### Method GET ### Endpoint /api/parsed_mails ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of emails to return. Clamped to 1-100. - **offset** (integer) - Optional - The number of emails to skip from the beginning of the list. 0-based. #### Request Body None ### Request Example ```bash curl -s "$BASE/api/parsed_mails?limit=20&offset=0" \ -H "Authorization: Bearer $JWT" ``` ### Response #### Success Response (200) - **results** (array) - An array of parsedMail objects. - **parsedMail** (object) - Represents a single parsed email. - **id** (integer) - Unique identifier for the email. - **message_id** (string) - The original message ID of the email. - **source** (string) - The sender's email address. - **to** (string) - The recipient's email address. - **created_at** (string) - The timestamp when the email was created. - **sender** (string) - The sender's name and email address. - **subject** (string) - The subject line of the email. - **text** (string) - The plain text content of the email. - **html** (string) - The HTML content of the email. - **attachments** (array) - An array of attachment metadata. - **filename** (string) - The name of the attachment. - **mimeType** (string) - The MIME type of the attachment. - **disposition** (string) - The content disposition of the attachment. - **size** (integer) - The size of the attachment in bytes. - **count** (integer) - The total number of emails in the inbox. #### Response Example ```json { "results": [ { "id": 42, "message_id": "<...>", "source": "noreply@foo.com", "to": "abc@yourdomain.com", "created_at": "2026-04-21 10:00:00", "sender": "Foo ", "subject": "Your code is 123456", "text": "Your code is 123456\n", "html": "

Your code is 123456

", "attachments": [ { "filename": "a.pdf", "mimeType": "application/pdf", "disposition": "attachment", "size": 12345 } ] } ], "count": 1 } ``` ``` -------------------------------- ### Frontend Deployment Documentation Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/AGENTS.md Documentation related to deploying the frontend application. This section covers deployment specifics for the Vue 3 + Naive UI app. ```markdown guide/ui/ ``` -------------------------------- ### Deploying New Page for Old Data Access Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/CHANGELOG_EN.md Instructions for deploying a new frontend page to access historical data, specifically for versions prior to v0.2.0. ```bash git checkout feature/backup cd frontend # Create a new pages for accessing old data pnpm run deploy --project-name temp-email-v1 ``` -------------------------------- ### Email Format Transformation: Change Domain Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/feature/user-oauth2.md Example of changing the domain of an email address using regex and a replacement template. ```text ^(.+)@old\.com$ ``` ```text $1@new.com ``` -------------------------------- ### Build Frontend Assets for Worker Deployment Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/cli/worker.md Build the frontend distribution files into the 'frontend/dist' directory. This step is necessary if you are deploying the worker with frontend assets. ```bash cd frontend pnpm install --no-frozen-lockfile pnpm build:pages ``` -------------------------------- ### Admin Delete Address API Example Response Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/feature/delete-address.md A successful deletion request will return a JSON object with a success status. ```json { "success": true } ``` -------------------------------- ### Redeploy Pages via Command Line Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/feature/google-ads.md Execute these commands after modifying the .env.prod file to build and deploy your pages. You may be prompted to create a project during the first deployment. ```bash pnpm build --emptyOutDir # For first deployment, you'll be prompted to create a project, fill in production for the production branch pnpm run deploy ``` -------------------------------- ### GET /api/settings Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/feature/agent-email.md Retrieves information about the current mailbox address and its send balance. This endpoint is also used to validate the Address JWT. ```APIDOC ## GET /api/settings ### Description Retrieves information about the current mailbox address and its send balance. This endpoint is also used to validate the Address JWT. ### Method GET ### Endpoint /api/settings ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl -s "$BASE/api/settings" -H "Authorization: Bearer $JWT" ``` ### Response #### Success Response (200) - **address** (string) - The email address of the mailbox. - **send_balance** (integer) - The remaining send balance for the mailbox. #### Response Example ```json { "address": "abc123@example.com", "send_balance": 0 } ``` ``` -------------------------------- ### List Inbox Emails with cURL Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/skills/cf-temp-mail-agent-mail/SKILL.md Retrieve a list of parsed emails from the inbox using a GET request to /api/parsed_mails. Supports pagination with 'limit' and 'offset' query parameters. ```bash curl -s "$BASE/api/parsed_mails?limit=20&offset=0" \ -H "Authorization: Bearer $JWT" ``` -------------------------------- ### Configure Environment Variables for Google Ads Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/en/guide/feature/google-ads.md Add these variables to your .env.prod file for command-line deployment or to FRONTEND_ENV for GitHub Action deployment. Refer to Google AdSense for specific values. ```dotenv VITE_GOOGLE_AD_CLIENT=ca-pub-123456 VITE_GOOGLE_AD_SLOT=123456 ``` -------------------------------- ### Build mail-parser-wasm for Release Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/mail-parser-wasm/README.md Build the mail-parser-wasm project for release and publish it using wasm-pack. ```bash wasm-pack build --release wasm-pack publish ``` -------------------------------- ### Add Multiple Resend API Keys for Different Domains Source: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/zh/guide/config-send-mail.md For multiple domains, add Resend API keys as secrets with names following the pattern RESEND_TOKEN_. For example, RESEND_TOKEN_XXX_COM. ```bash wrangler secret put RESEND_TOKEN_XXX_COM wrangler secret put RESEND_TOKEN_DREAMHUNTER2333_XYZ ```