目录

A Simple Web API to Generate Temporary Gmail. With a Json Response easy to manage messages and working with IMAP Gmail Provider

Notice

This repository is only public for educational purposes! All content provided here shall not be used for any kind of illegal activity nor for law enforcement at any time. This restrictions apply to all cases of usage, no matter whether the whole code or just parts of it are being used.

Build With

Feature Status
Limit Request to API
Use .env file to config Account
Read Specific Email Body
Delete Email
Generate Dot Trick Email
Web App Work In Progress

Run Locally

Clone the project

  git clone https://github.com/Setiawan007/Temporary-Gmail

Go to the project directory

  cd Temporary-Gmail

Install dependencies

   pip3 install -r ./requirements.txt

Start the server

  python3 main.py

Access server

  Go to http://127.0.0.1:5000

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

Email -> Your Gmail Email

Password -> Your Gmail Password

API Reference

Generate Temporary Email

Request :

  GET /generate/<type>
Parameter Type Description
type string Required. type (dot/dotplus)

Response :

// http://127.0.0.1:5000/generate/dot
{
    "data": {
        "email": "yo.ur.em.a.il.777@gmail.com",
        "mailbox": "/read/yo.ur.em.a.il.777@gmail.com",
        "status": true
    },
    "message": "Success",
    "status": true
}

// http://127.0.0.1:5000/generate/dotplus
{
     "data": {
          "email": "yo.ur.em.a.il.777+37@gmail.com",
          "mailbox": "/read/yo.ur.em.a.il.777+37@gmail.com",
          "status": true
     },
     "message": "Success",
     "status": true
}

Read Messages

Request :

  GET /read/<email>
Parameter Type Description
email string Required. Your Email

Response :

// http://127.0.0.1:5000/read/yo.ur.em.a.il.777+37@gmail.com
{
     "data": [
          {
               "body": "Test 1\r\n",
               "date": "Thu, 08 Sep 2022 15:27:42 GMT",
               "from": "yo.ur.em.a.il.777+37@gmail.com",
               "subject": "Test Email Temp",
               "to": [
                    "yo.ur.em.a.il.777+37@gmail.com"
               ],
               "uid": "125"
          }
     ],
     "email": "yo.ur.em.a.il.777+37@gmail.com",
     "message": "Messages appear",
     "status": true
}

Read Messages by Text in Body

Request :

  GET /readby/<email>/<string_in_body>
Parameter Type Description
email string Required. Your Email
string_in_body string Required. specific string in body message

Response :

// http://127.0.0.1:5000/readby/yo.ur.em.a.il.777+37@gmail.com/Test
{
     "data": [
          {
               "body": "Test 1\r\n",
               "date": "Thu, 08 Sep 2022 15:27:42 GMT",
               "from": "yo.ur.em.a.il.777+37@gmail.com",
               "subject": "Test Email Temp",
               "to": [
                    "yo.ur.em.a.il.777+37@gmail.com"
               ],
               "uid": "125"
          }
     ],
     "email": "yo.ur.em.a.il.777+37@gmail.com",
     "message": "Messages appear",
     "status": true
}

Delete Message

Request :

  GET /delete/<uid>
Parameter Type Description
uid string Required. uid from message

Response :

// http://127.0.0.1:5000/delete/125

true

Another Response

// Message not exist
{
     "email": "yo.ur.em.a.il.777+37@gmail.com",
     "message": "No messages appear",
     "status": false
}

// Limit Request by Flask_limiter
{
     "message": "You have reached the request limit of 20 per 1 minute requests per day",
     "status": "error"
}

Support

Thank you for visiting this repository, if this repository is useful for your project please give a star ⭐️🙏❤️️

关于
13.1 MB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号