Current collected state Current
Observed since 20 Oct, 18:37 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
1secmail-api
A Node API for 1secmail.com
A NodeJS API for 1secmail.com
The below example creates an email account at exampleAccount@1secmail.com and fetches emails every 10 seconds.
const { TempMail } = require("1secmail-api");
// Create email account
const mail = new TempMail("exampleAccount");
// Enable auto-fetching full emails
mail.autoFetch();
// Wait until the client is ready
mail.onReady(() => {
// Should show: exampleAccount@1secmail.com
console.log("Email ready! Address:", mail.address);
// Get emails every 10 seconds
const fetch = () => {
mail.getMail().then((mails) => {
console.log(mails);
mail.deleteMail();
});
};
fetch();
setInterval(fetch, 10 * 1000);
});
You can also chose different domains by passing an extra argument to the TempMail constructor:
// john@esiix.com
const mail = new TempMail("john", "esiix.com");
To generate random email addresses use mail
mail.getRandomAddress();
To download an attachment use mail.getAttachment(id, file) and pass the email ID and the file name.
Download counts and popularity will appear here as the collector receives them.
Declarations describe requirements; they are not a resolved dependency graph.
Source distribution
{
"integrity": "sha512-vzqwtAg4tW/hpHxyXwwiXg81sZ7qQkrjoOze/piR1PRed7VSyXvaTzEOcPLYouAUIJVxs1celRb/pu6CuDnmpQ==",
"shasum": "f18dfa005876efb51bc591c08a1bc284418d5709",
"tarball": "https://registry.npmjs.org/1secmail-api/-/1secmail-api-1.0.2.tgz",
"fileCount": 5,
"unpackedSize": 7182,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEQCIGPV3lwXF2rcz8QNKO4vNW1c6WhwBmtyC0al6RAw0AJlAiBUhFzUYQdVXf0EXItDI48XRq2VD+eEZTotkTnXNzj1AA=="
}
]
}Observed since 20 Oct, 18:37 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:e092b564b66278d8f81724a0a26d054908bf1058fc76ae9cfb7001cb5bfcdabb