Giter Club home page Giter Club logo

email-exists's Introduction

email-exists

Check whether an email address exists.

This module checks whether an email address exists by connecting to the mail server and pretending to send an email (but not actually sending it, of course).

For checking whether an email is syntactically valid, please use hapijs/isemail.

Installation

npm install email-exists

Quickstart

const emailExists = require('email-exists')

emailExists({ sender: '[email protected]',
              recipient: '[email protected]' })
    .then(console.log)
    // --> MAY_EXIST

API

emailExists(options)

  • requires an options <Object> with the following properties:
    • sender <String>: required; the sender's email address for the MAIL FROM command
    • recipient <String>: required; the recipient's email address for the RCPT TO command
    • timeout <Number>: default = 3000; the timeout in milliseconds for the Telnet connection
    • debug <Boolean>: default = false; whether to print debug messages to the console
  • returns a <Promise> which:
    • resolves with one of the following <String> objects:
      • INVALID_SYNTAX: Represents a 553 indicating that the mailbox name is not allowed due to invalid syntax
      • NOT_FOUND: Represents a 550 indicating that the mailbox is unavailable, cannot be found, or may not be accessed
      • MAY_EXIST: To prevent clients from discovering all available addresses, servers may respond with false positives; therefore, this result is deliberately named "may exist", indicating that it is highly likely that the address actually exists, but that it cannot be confirmed (without actually sending a confirmation mail)
    • rejects with an <Error> object if either the DNS lookup or the Telnet connection fails

Maintainers

License

MIT

email-exists's People

Contributors

andrew0x0007c8 avatar marktiedemann avatar

Watchers

 avatar  avatar

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.