File size: 582 Bytes
59485cb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | async function h() {const TempMail = require("node-temp-mail");
// Let's create an address object so it can be accessed by the module.
const address = new TempMail("testAddress");
// We already have the address object, so now let's access it and get a list of the emails in a nice & neat json object.
address.fetchEmails((err, body) => {
console.log(body);
});
// Or we can use the async/await syntax
const body = await address.fetchEmails();
// If for any reason you need to see the full temporary email address, you can use the following function.
address.getAddress();}
h() |