https://github.com/williamfalcon/node-tempmail
https://github.com/williamfalcon/node-tempmail
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/williamfalcon/node-tempmail
- Owner: williamFalcon
- License: mit
- Created: 2016-08-02T17:07:21.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-02T17:08:55.000Z (almost 10 years ago)
- Last Synced: 2025-01-22T11:47:41.901Z (over 1 year ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tempmail
Easily create temporary emails and fetch their inbox.
## Usage & Installation
```
npm install tempmail
```
to use the CLI interface, install globally with `-g`
### From the command line
```bash
./tempmail [emailAddress]
```
- Specifying only a provider will create a new temporary email address.
- Specifying a provider + email will return the inbox (in JSON format).
e.g.
```javascript
[
{
"from": "John Smith",
"to": "zqm46662@ssoia.com",
"subject": "sample subject",
"date": "just now",
"content": "\n\t
3434234
\n\t"
},
{ /* another email message ... */ }
]
```
### As a Node.js module
It follows the same concept, and returns the inbox array vs. a JSON representation of it.
```javascript
var tempmail = require('tempmail');
var provider = '10minutemail.net'; // or '10mm.net'
// Create a new temporary email
tempmail.new(provider).then(function(tempEmail) {
console.log('new temporary email', tempEmail);
// Retrieve emails from an email address
return tempmail.get(provider, tempEmail);
}).done(function (inbox) {
console.log('The inbox (empty array - no emails sent yet)');
console.log(inbox);
});
```
## Providers
Providers are services that provide temporary emails.
- [10minutemail.net](http://10minutemail.net/)
- That's it for now.