Giter VIP home page Giter VIP logo

temp-mail-api's Introduction

Temp Mail API

NodeJS API for temp-mail.org

โš  Temp-mail.org devs remade their API on Oct 2020 so it uses a secured way to make requests. I will try to bypass it because it looks interesting. My work is available in the experiments.js file. โš 


Installation

npm install temp-mail-api

Examples (test.js)

const TM = require('temp-mail-api');

const email1 = new TM('temp-email'); // It will create an address like "[email protected]"

// Waiting for the email to be ready (recommended)
email1.ready((email, error) => {
  if (!error) {
    console.log(`Email address is ${email}`);

    // Getting email list
    email1.getEmails((emails, error) => {
      if (!error) {
        console.log('Email list :', emails);
      } else console.error(error);
    });

    // Fetching email list every 1 second and log if there is a new email
    setInterval(() => {
      email1.getEmails((emails, error, change) => {
        if (!error) {
          if (change) console.log('New mail !', emails);
        } else console.error(error);
      });
    }, 1000);

  } else console.error(error);
});

Problems

If you have errors in console or unwanted behavior, please create an issue here.

temp-mail-api's People

Contributors

killdozerx2 avatar mathieu2301 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

temp-mail-api's Issues

Test.js not working

Did try the package however I got a issue:

Error: Can't parse server response
at IncomingMessage. (C:\Users\Red\Downloads\Aliexpress-accgen-mas
node_modules\temp-mail-api\request.js:22:22)

Just to let you know

Thanks

Issue first run

Error: Can't parse server response
at IncomingMessage. (/root/node_modules/temp-mail-api/request.js:22:22)
at IncomingMessage.emit (events.js:322:22)
at endReadableNT (_stream_readable.js:1187:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
i copypasted your test code

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.