Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 1008 Bytes

File metadata and controls

44 lines (29 loc) · 1008 Bytes

tempmail

Easily create temporary emails and fetch their inbox.

Usage & Installation

npm install tempmail

From the command line

./tempmail <provider> [emailAddress]
  • By specifying only a provider, it will create a new email address.
  • Specifying an email will return the inbox (JSON).

As a module:

var tempmail = require('tempmail');

// using 10minutemail as our provider
var provider = new tempmail('10minutemail.net');

// Create a new temporary email
provider.newTempEmail(provider).then(function(tempEmail) {
	console.log(tempEmail);
	var emailAddress = tempEmail.getAddress();

	// Retrieve emails from an email address
	provider.readEmailAddress(emailAddress).then(function(inbox) {
		console.log(inbox); // an array of inbox message objects
	});
});

Providers

Providers are services that provide temporary emails. See the example above on how to use a specific provider.