├── .eslintrc.json
├── public
├── mail.png
├── arrow.png
├── delete.png
├── copyicon.png
├── loadingarrowicon.png
└── loadinganimation.svg
├── src
└── app
│ ├── favicon.ico
│ ├── components
│ ├── Title.tsx
│ ├── RandomEmailBox.tsx
│ ├── Button.tsx
│ ├── MailBox.tsx
│ ├── MessagePageBox.tsx
│ └── About.tsx
│ ├── layout.tsx
│ ├── api
│ └── route.ts
│ ├── globals.css
│ └── page.tsx
├── next.config.js
├── postcss.config.js
├── .gitignore
├── tailwind.config.js
├── package.json
├── tsconfig.json
├── LICENSE
├── CONTRIBUTING.md
└── README.md
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "next/core-web-vitals"
3 | }
4 |
--------------------------------------------------------------------------------
/public/mail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vikashkhati007/FakeMailGenerator/HEAD/public/mail.png
--------------------------------------------------------------------------------
/public/arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vikashkhati007/FakeMailGenerator/HEAD/public/arrow.png
--------------------------------------------------------------------------------
/public/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vikashkhati007/FakeMailGenerator/HEAD/public/delete.png
--------------------------------------------------------------------------------
/public/copyicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vikashkhati007/FakeMailGenerator/HEAD/public/copyicon.png
--------------------------------------------------------------------------------
/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vikashkhati007/FakeMailGenerator/HEAD/src/app/favicon.ico
--------------------------------------------------------------------------------
/next.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {}
3 |
4 | module.exports = nextConfig
5 |
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | }
7 |
--------------------------------------------------------------------------------
/public/loadingarrowicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vikashkhati007/FakeMailGenerator/HEAD/public/loadingarrowicon.png
--------------------------------------------------------------------------------
/src/app/components/Title.tsx:
--------------------------------------------------------------------------------
1 | const Title = () => {
2 | return (
3 | <>
4 |
4 |
ABOUT
5 |
6 |
7 | Welcome to Temporary Mail Generator, the ultimate online destination for individuals who value their privacy and seek convenient email solutions. Our innovative platform allows you to generate temporary email addresses effortlessly, providing you with a secure and reliable way to communicate without compromising your personal information.
8 |
9 |
10 | Using our user-friendly interface, you can quickly generate a temporary email address with just a few clicks. These email addresses are fully functional, allowing you to receive messages, attachments, and verification emails as needed. Your temporary inbox is easily accessible, enabling you to check for important communications while keeping your primary email account clutter-free and shielded from potential threats.
11 |
12 |
13 | Protect your privacy and simplify your online communication with Temporary Mail Generator. Start generating temporary email addresses today and experience a secure and hassle-free way to engage in online activities while keeping your personal information secure. Stay in control of your digital presence and enjoy the peace of mind you deserve.
14 |
15 |
16 | );
17 | };
18 |
19 | export default About;
20 |
--------------------------------------------------------------------------------
/src/app/api/route.ts:
--------------------------------------------------------------------------------
1 | export async function GET() {
2 | const res = await fetch(
3 | process.env.GETROUTEAPI!,
4 | {
5 | credentials: "include",
6 | headers: {
7 | "User-Agent":
8 | "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0",
9 | Accept: "*/*",
10 | "Accept-Language": "en-US,en;q=0.5",
11 | "Content-Type": "application/json",
12 | "Application-Name": "web",
13 | "Application-Version": "4.0.0",
14 | "X-CORS-Header": "iaWg3pchvFx48fY",
15 | "Sec-GPC": "1",
16 | "Sec-Fetch-Dest": "empty",
17 | "Sec-Fetch-Mode": "cors",
18 | "Sec-Fetch-Site": "same-site",
19 | Priority: "u=4",
20 | },
21 | referrer: process.env.REFERRERURL,
22 | body: '{"min_name_length":10,"max_name_length":10}',
23 | method: "POST",
24 | mode: "cors",
25 | }
26 | );
27 |
28 | const rawText = await res.text();
29 | const data = JSON.parse(rawText);
30 | return new Response(data.email);
31 | }
32 |
33 | export async function POST(req: Request) {
34 | const body = await req.json(); // grabs JSON from POST request
35 | const res = await fetch(
36 | `${process.env.POSTROUTEAPI}${body.email}/messages`,
37 | {
38 | credentials: "include",
39 | headers: {
40 | "User-Agent":
41 | "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0",
42 | Accept: "*/*",
43 | "Accept-Language": "en-US,en;q=0.5",
44 | "Content-Type": "application/json",
45 | "Application-Name": "web",
46 | "Application-Version": "4.0.0",
47 | "X-CORS-Header": "iaWg3pchvFx48fY",
48 | "Sec-GPC": "1",
49 | "Sec-Fetch-Dest": "empty",
50 | "Sec-Fetch-Mode": "cors",
51 | "Sec-Fetch-Site": "same-site",
52 | Priority: "u=4",
53 | },
54 | referrer: process.env.REFERRERURL,
55 | method: "GET",
56 | mode: "cors",
57 | }
58 | );
59 | const data = await res.text();
60 | return new Response(data);
61 | }
62 |
--------------------------------------------------------------------------------
/src/app/globals.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 | @import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@500&display=swap');
6 | @import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@500&display=swap');
7 | @import url('https://fonts.googleapis.com/css2?family=Righteous&display=swap');
8 | @import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@500&display=swap');
9 | @import url('https://fonts.googleapis.com/css2?family=Aoboshi+One&display=swap');
10 | @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300&display=swap');
11 |
12 | :root {
13 | --foreground-rgb: 0, 0, 0;
14 | --background-start-rgb: 214, 219, 220;
15 | --background-end-rgb: 255, 255, 255;
16 | }
17 |
18 | * {
19 | margin: 0;
20 | padding: 0;
21 | box-sizing: border-box;
22 | }
23 |
24 | body {
25 | background-color: white;
26 |
27 | }
28 |
29 | .title {
30 | font-family: 'Be Vietnam Pro', sans-serif;
31 | }
32 |
33 | .button {
34 | font-family: 'Urbanist', sans-serif;
35 | }
36 |
37 | .inbox {
38 | font-family: 'Righteous', cursive;
39 | }
40 |
41 | .mailtitle {
42 | font-family: 'DM Sans', sans-serif;
43 | }
44 |
45 | /* CSS for the custom scrollbar */
46 | .custom-scrollbar {
47 | scrollbar-width: thin;
48 | scrollbar-color: rgba(136, 136, 136, 0.4) rgba(241, 241, 241, 0.4);
49 | }
50 |
51 | .custom-scrollbar::-webkit-scrollbar {
52 | width: 8px;
53 | /* Decreased width for scrollbar */
54 | background-color: rgba(241, 241, 241, 0.4);
55 | }
56 |
57 | .custom-scrollbar::-webkit-scrollbar-thumb {
58 | background-color: rgba(136, 136, 136, 0.4);
59 | border-radius: 15px;
60 | }
61 |
62 | .custom-scrollbar::-webkit-scrollbar-thumb:hover {
63 | background-color: rgba(85, 85, 85, 0.6);
64 | }
65 |
66 | .custom-scrollbar::-webkit-scrollbar-track {
67 | background-color: rgba(241, 241, 241, 0.4);
68 | }
69 |
70 | .about h1 {
71 | font-family: 'Aoboshi One', serif;
72 | }
73 |
74 | .about p{
75 | font-family: 'Poppins', sans-serif;
76 | }
77 |
78 | .mailboxcontainer {
79 | /* Add necessary styles */
80 | overflow-y: scroll; /* Enable vertical scrolling */
81 | scrollbar-width: none; /* Hide the scrollbar for Firefox */
82 | -ms-overflow-style: none; /* Hide the scrollbar for IE 10+ */
83 | }
84 |
85 | /* Hide the scrollbar for Chrome, Safari, and Opera */
86 | .mailboxcontainer::-webkit-scrollbar {
87 | width: 0;
88 | background: transparent;
89 | }
90 |
91 | /* Add a custom scrollbar style for Firefox */
92 | .mailboxcontainer::-moz-scrollbar {
93 | width: 0;
94 | background: transparent;
95 | }
96 |
97 | .mailboxcontainer::-moz-scrollbar-thumb {
98 | background: #888;
99 | border-radius: 10px;
100 | }
101 |
102 | .mailboxcontainer::-moz-scrollbar-thumb:hover {
103 | background: #555;
104 | }
105 |
106 | /* Add a custom scrollbar style for Webkit (Chrome, Safari, and Opera) */
107 | .mailboxcontainer::-webkit-scrollbar-thumb {
108 | background: #888;
109 | border-radius: 10px;
110 | }
111 |
112 | .mailboxcontainer::-webkit-scrollbar-thumb:hover {
113 | background: #555;
114 | }
115 |
--------------------------------------------------------------------------------
/src/app/page.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React, { useState, useEffect } from "react";
3 | import Image from "next/image";
4 | import Button from "./components/Button";
5 | import MailBox from "./components/MailBox";
6 | import RandomEmailBox from "./components/RandomEmailBox";
7 | import Title from "./components/Title";
8 | import About from "./components/About";
9 | import MessagePageBox from "./components/MessagePageBox";
10 | const Home = () => {
11 | const [refresh, setRefresh] = useState(false);
12 | const [del, setDelete] = useState(false);
13 | const [email, setEmail] = useState("");
14 | const [message, setMessageData] = useState([]);
15 | const [username, setUsername] = useState("");
16 | const [domain, setDomain] = useState("");
17 | const [messageShow, setMessageShow] = useState(false);
18 | const [messageSubject, setMessageSubject] = useState("");
19 | const [messageFrom, setMessageFrom] = useState("");
20 | const [messageTextBody, setMessageTextBody] = useState("");
21 |
22 | useEffect(() => {
23 | async function getEmail() {
24 | const res = await fetch(
25 | "https://fake-mail-generator.vercel.app/api/"
26 | );
27 | const randomEmail = await res.text();
28 | setEmail(randomEmail);
29 | const email = randomEmail;
30 | const atIndex = email.indexOf("@");
31 | const username = email.substring(0, atIndex);
32 | setUsername(username);
33 | const domain = email.substring(atIndex + 1);
34 | setDomain(domain);
35 |
36 | //Message Retreival
37 | const interval = setInterval(async () => {
38 | const res2 = await fetch("/api", {
39 | method: "POST",
40 | headers: {
41 | "Content-Type": "application/json",
42 | },
43 | body: JSON.stringify({ email: email}),
44 | });
45 | const messageData = await res2.json();
46 | setMessageData(messageData);
47 | }, 1000);
48 |
49 | return () => {
50 | clearInterval(interval);
51 | };
52 | }
53 |
54 | getEmail();
55 | }, [del]);
56 |
57 | async function refreshMessage() {
58 | const res2 = await fetch("https://fake-mail-generator.vercel.app/api", {
59 | method: "POST",
60 | headers: {
61 | "Content-Type": "application/json",
62 | },
63 | body: JSON.stringify({ email: email}),
64 | });
65 | const messageData = await res2.json();
66 | setMessageData(messageData);
67 | }
68 |
69 | function copyToClipboard(email: any) {
70 | var input = document.createElement("input");
71 | input.value = email;
72 | document.body.appendChild(input);
73 | input.select();
74 | input.setSelectionRange(0, 99999);
75 | document.execCommand("copy");
76 | document.body.removeChild(input);
77 | }
78 |
79 | function whichMessageClicked(d: any) {
80 | // Set Message Refreshed Data
81 | const data = message.filter((item: any) => item.id === d);
82 | //@ts-ignore
83 | setMessageFrom(data[0].from);
84 | //@ts-ignore
85 | setMessageTextBody(data[0].body_text);
86 | //@ts-ignore
87 | setMessageSubject(data[0].subject);
88 | setMessageShow(true);
89 | }
90 |
91 | return (
92 |