Skip to content

Repository files navigation

TempMail — Free Temporary Email Address

A fast, free, and private disposable email web app built with Next.js 16 (App Router) and Tailwind CSS. Generate a throwaway email address in one click, receive messages, and read them right in your browser — no registration, ever. It also ships with a Gmail Alias Generator that creates hundreds of unique Gmail addresses from a single account.

Next.js React TypeScript Tailwind CSS

TempMail app screenshot


🔗 Live demo: https://temp-mail-app-sooty.vercel.app

✨ Features

  • Instant temp address — generate a unique disposable email in a single click.
  • Zero registration — no account, password, or personal data required.
  • Auto-refreshing inbox — polls every 30 seconds, new mail appears automatically.
  • Read messages in-browser — sender, subject, and full body in a clean reading view.
  • One-click copy — grab your address and paste it into any signup form.
  • Tap-to-copy verification codes — OTP codes are auto-detected and copied with one tap.
  • Provider fallback — if mail.tm is unavailable (e.g. a blocked cloud IP), new addresses are created automatically via GuerrillaMail, so the app keeps working.
  • Privacy first — inbox state is stored only in your browser; nothing is tracked.
  • Gmail alias generator — generate unlimited aliases from your Gmail with dot tricks, plus tags, and Googlemail swaps.
  • Dark / light mode — follows your system preference.
  • Fully responsive — works beautifully on desktop and mobile.

🧰 Tech Stack

Layer Technology
Framework Next.js 16 (App Router, Turbopack)
Language TypeScript
Styling Tailwind CSS v4
Email API mail.tm with GuerrillaMail fallback
Alias engine Gmail dot / plus / Googlemail tricks (client-side)
Node runtime Node.js 20.9+

🚀 Getting Started

Prerequisites

  • Node.js 20.9.0 or newer
  • npm, yarn, pnpm, or bun

Install & run locally

# 1. Clone the repository
git clone https://github.com/sreyassanker/Temp-Mail.git
cd Temp-Mail

# 2. Install dependencies
npm install

# 3. Start the development server
npm run dev

Open http://localhost:3000 with your browser.

Production build

npm run build
npm start

🔍 How It Works

  1. Generate — the app fetches an active domain from the mail.tm API and creates a fresh inbox; if mail.tm fails, it automatically falls back to a GuerrillaMail address instead.
  2. Use — copy the address and use it anywhere that requires an email.
  3. Read — incoming mail shows up in the live inbox; click any message to open it.
  4. Repeat — generate a brand-new address whenever you want a clean slate.

Provider routing: message listing and reading are routed by address domain — @guerrillamail… addresses use GuerrillaMail, everything else uses mail.tm. Both providers' message shapes are normalized to a single type, so the UI never changes.

✨ Gmail Alias Generator

Enter your Gmail address and get hundreds of unique addresses that still deliver to your real inbox — useful for taming spam, analytics, and signup filters without creating new accounts:

Trick Example Why it works
Dot trick j.ohndoe@gmail.com = johndoe@gmail.com Gmail ignores dots in the username
Plus tag johndoe+signup@gmail.com +tag routes to the base mailbox
Googlemail swap johndoe@googlemail.com @googlemail.com and @gmail.com are the same

For a canonical username of length n, the generator can produce 2^(n-1) dot variations (capped at 64 for performance), plus unlimited tag aliases and the Googlemail variant.

API routes

Method Route Description
POST /api/mailbox Create a new disposable mailbox, returns address
GET /api/mailbox List inbox messages (?address=...)
GET /api/mailbox Read a single message (?address=...&id=...)

📁 Project Structure

app/
├── api/mailbox/route.ts      # API route handlers (create, list, read)
├── components/
│   ├── TempMailWidget.tsx    # Client widget: inbox, copy, auto-refresh, reader
│   └── TempGmailWidget.tsx   # Gmail alias generator widget
├── lib/
│   ├── mailbox.ts            # Provider dispatcher (mail.tm → GuerrillaMail fallback)
│   ├── mailtm.ts             # mail.tm API client + helpers
│   ├── guerrillamail.ts      # GuerrillaMail API client (fallback provider)
│   └── gmail-alias.ts        # Gmail dot / plus / Googlemail alias engine
├── globals.css               # Tailwind theme & design tokens
├── layout.tsx                # Root layout & metadata
└── page.tsx                  # Landing page

🛠️ Scripts

Command Description
npm run dev Start dev server (Turbopack)
npm run build Create optimized production build
npm start Run production build locally
npm run lint Run ESLint

📄 License

MIT — free to use, modify, and share. See the LICENSE file for details.

TempMail is for legitimate privacy protection (avoiding spam, protecting your personal inbox). Please use responsibly.

About

Free temporary email & disposable inbox — generate throwaway addresses, read mail in-browser, and create unlimited Gmail aliases via dot/plus/Googlemail tricks. Built with Next.js 16, React 19, Tailwind CSS 4.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages