tempmail-js
tempmail.js uses MongoDB to store it's data.
Installation
Installing tempmail.js is very easy, all you have to do is:
- Clone the repository
git clone https://github.com/1337vida/tempmail-js.git
- Install required NPM packages
npm install
- Customize your
config.json
- 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 0.0.0.0
;; MX Records
example.com. 1 IN MX 10 mail.example.com.
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
Roadmap
- 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?
Contributing
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE
for more information.