@jollie/risky-email

1.0.12 • Public • Published

Version Licence Build Coverage Downloads

for internal use only - Draft idea to check trustworthiness of email account

risky-email

Check if email is from disposable provider or has no DNS MX record

Install

yarn add @jollie/risky-email

or

npm install @jollie/risky-email

Usage

const isRiskyEmail = require('@jollie/risky-email');

// Diposable email 
// Output "Risky email : Disposable email address"
isRiskyEmail('contact@yopmail.com')
  .then(() => console.log('Not risky'))
  .catch(error => console.log(`Risky email : ${error.message}`);
  
// Non-existent domain 
// Output "Risky email : queryMx ENOTFOUND he-llo-w-orld.com"
isRiskyEmail('contact@he-llo-w-orld.com')
  .then(() => console.log('Not risky'))
  .catch(error => console.log(`Risky email : ${error.message}`);
    
// Valid email -> Output "Not risky"
isRiskyEmail('contact@google.com')
  .then(() => console.log('Not risky'))
  .catch(error => console.log(`Risky email : ${error.message}`);

Return value

Promise resolved with the email or rejected if risky email

Dependencies (0)

    Dev Dependencies (7)

    Package Sidebar

    Install

    npm i @jollie/risky-email

    Weekly Downloads

    0

    Version

    1.0.12

    License

    MIT

    Unpacked Size

    15.1 kB

    Total Files

    6

    Last publish

    Collaborators

    • thejellyfish