Giter VIP home page Giter VIP logo

server-accepts-email's Introduction

Server Accepts Email

Check if an SMTP server accepts emails to a given address.

Installation

npm install --save server-accepts-email

Usage

const serverAcceptsEmail = require('server-accepts-email')

console.log(await serverAcceptsEmail('[email protected]'))
//=> true

console.log(await serverAcceptsEmail('[email protected]'))
//=> false

console.log(await serverAcceptsEmail('[email protected]'))
//=> false

API

serverAcceptsEmail(email[, options]) => Promise<boolean>

  • email (string, required) - Email address to test
  • options (object, optional)
    • senderDomain (string, optional) - Domain to identify as (in HELO smtp command)
    • senderAddress (string, optional) - Email address to identify as (in MAIL FROM command)

Other libraries

There are some other libraries that do the same thing, but I found them to have some flaws which made me write this one.

  Promise API Follows RFC5321 1 Proper Errors 2 Handles Greylisting 3 Connection Pooling 4
server-accepts-email
email-exists
email-existence
email-verify

1 None of the other libraries parsed the replies to support multiline replies but instead relied on every reply coming in a chunk, accepting all data and searching for substrings, or something similar.

2 Some of the other libraries rejects, or calls the callback, with something other than an Error instance.

3 This library detects Greylisting and sends another request after the timeout has passed.

4 This library reuses connections, and limits the number of simultaneous connections to any given host. This is more effecient, and the behaviour more closely matches that of proper SMTP clients, decreasing the chance of being blacklisted.

server-accepts-email's People

Contributors

cstruct avatar dyatko avatar linusu avatar

Watchers

 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.