⚡️ Free, open-source and easy to setup tempmail written in Node.JS!

tempmail.js uses MongoDB to store it’s data.


Installing tempmail.js is very easy, all you have to do is:

  1. Clone the repository
git clone https://github.com/1337vida/tempmail-js.git
  1. Install required NPM packages
npm install
  1. Customize your config.json
  2. Run the script!
npm start

Adding a new domain

To add a new domain, make sure you setup CloudFlare on it, and point DNS records like this:

;; A Records
mail.example.com.	1	IN	A

;; MX Records
example.com.	1	IN	MX	10 mail.example.com.

DNS Record Example

API Information

All requests need to be authorized via Authorization header which contains the api key from config.json

Method for all the requests is GET

API Routes

Here are all the available routes for tempmail.js:

  • /api/domains
  • /api/:inbox
  • /api/:inbox/list
  • /api/:inbox/latest
  • /api/:inbox/:emailId


  • Add real-time notification system, maybe based on socket.io?
  • Add a webhook notifier on new email
  • Add support for multiple api keys, maybe queried from the database?


Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag “enhancement”. Don’t forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request


Distributed under the MIT License. See LICENSE for more information.


View Github