@jollie/unsafe-email

1.1.0 • Public • Published

Version Licence Build Coverage Downloads

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

unsafe-email

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

Install

yarn add @jollie/unsafe-email

or

npm install @jollie/unsafe-email

Usage

const isTricky = require('@jollie/unsafe-email');

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

Return value

Promise resolved with the email or rejected if unsafe email

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    2

Package Sidebar

Install

npm i @jollie/unsafe-email

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

15.1 kB

Total Files

6

Last publish

Collaborators

  • thejellyfish