Skip to content
This repository has been archived by the owner on Mar 5, 2021. It is now read-only.
/ gmailnator-server Public archive

A portable http server that acts as a relay to interact with https://gmailnator.com/

Notifications You must be signed in to change notification settings

Y0GAAAA/gmailnator-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gmailnator server

A local http server built with rocket that offers great interoperability.

Background :

After creating the gmailnator crate for Rust, I realized that support for selenium and other tools that would come in handy in a potential automation process was very limited within the Rust environment, that's why this repository exists.

Quick start :

Configuration :

When starting the server, if no configuration file is found the default one will be created in the working directory with the name : settings.ini

Fields :

port The port on which the http server will listen, default is 80
address_expiration The duration in seconds between the address queue renewals, default is 82800 (23 hours)

Endpoints :

Note : The local address/host is managed by Rocket and changes depending on whether the build is a release or a debug build, check the Rocket banner that is printed at program startup.

Note 2 : The "real" gmailnator server is a huge bottleneck, it is slow. A /get_messages call can take up to a few seconds, drink some tea and relax 🍵

GET /new_address                         Responds with a new gmailnator address in a raw string format.
                                                        Example response : wildtmp+zqeia@gmail.com

GET /get_messages/<address>      Responds with a json string containing the messages in the inbox.
                                                       Example response :

[
    {
        "subject": "first message",
        "raw_content": "contenu incroyable"
    },
    {
        "subject": "second message",
        "raw_content": "what's up ?"
    }
]