Security News
OpenJS: “XZ Utils Cyberattack Likely Not an Isolated Incident”
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.
tempmail.js
Advanced tools
Weekly downloads
Readme
Programatically generate and receive mail from temporary email addresses. Works in browsers and in node.js.
tempmail.js provides a JavaScript wrapper around api.temp-mail.ru
.
Browser:
<script type="text/javascript" src="/dist/tempmail.min.js"></script>
Node.js:
npm install tempmail.js
Generate a new email address
// if using node.js
var TempMail = require('tempmail.js');
// ES6
import TempMail from 'tempmail.js';
// create a random address
var account = new TempMail();
console.log(account.address); // a0953d5f9e1c01573d290823b1bbe8d1@walkmail.ru
// Create your own address at one of the tempmail domains
var account = new TempMail('example@walkmail.ru');
console.log(account.address); // example@walkmail.ru
Get messages
account.getMail().then((messages) => {
console.log(messages);
});
Message response format
[ { id: 'c3e7ed132aefe624a8539307a45ec7c9',
uid: '68450627',
from: 'Bob Smith <bob@smith.com>',
subject: 'hey bro whats up',
preview: 'sup dude\n\n',
text: 'sup dude',
text_only: 'sup dude',
html: '',
timestamp: Mon Nov 03 2014 17:50:15 GMT-0800 (PST) },
{ id: '030199e2ede68f8aefe0d858c9071271',
uid: '68452459',
from: 'Super Cool Dude <hessuper@cool.com>',
subject: 'cool subject line',
preview: 'yeah man\n\n\n',
text: '',
text_only: 'yeah man\n\n\n\n',
html: '<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">yeah man<br><div apple-content-edited="true">\n<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div></div></div><br></div>\n<br></body></html>\n',
timestamp: Mon Nov 03 2014 17:51:42 GMT-0800 (PST)
}]
Delete Message
account.deleteMessage(someEmail.id).then((deletedMessage) {
console.log(deletedMessage);
});
Get domains
account.domains().then((domains) {
console.log(domains);
});
Domain response format
[
'@dlemail.ru',
'@flemail.ru',
'@shotmail.ru',
'@walkmail.ru'
]
FAQs
Programatically generate and receive mail from temporary email addresses. Works in browsers and in node.js.
The npm package tempmail.js receives a total of 105 weekly downloads. As such, tempmail.js popularity was classified as not popular.
We found that tempmail.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.
Company News
Come meet the Socket team at BSidesSF and RSA! We're sponsoring several fun networking events and we would love to see you there.
Security News
OSI is starting a conversation aimed at removing the excuse of the SaaS loophole for companies navigating licensing and the complexities of doing business with open source.