Skip to content

Instantly share code, notes, and snippets.

@saqibameen
Last active July 19, 2018 21:39
Show Gist options
  • Save saqibameen/f5ce65f9ca45e062b6d50d58a7e2ed3b to your computer and use it in GitHub Desktop.
Save saqibameen/f5ce65f9ca45e062b6d50d58a7e2ed3b to your computer and use it in GitHub Desktop.
Module to verify email addresses using Email Verification API
// Import the module.
const emailVerifier = require("email-verifier");
// Create a new instance with your username and password.
const verifier = new emailVerifier("your_username", "your_password");
// Time to verify the email address.
verifier.verify("xyz@domain.com", (err, data) => {
if (err) throw err; // Look for errors.
console.log(data); // Otherwise dump the results to the log.
});
// Sample output for valid email address.
/*
{
"catchAll": "false",
"disposable": "false",
"dns": "OK",
"emailAddress": "xyz@domain.com",
"free": "false",
"mxs": [ "mail.xyz " ],
"smtp": "OK",
"validFormat": "OK"
}
*/
@ahmadawais
Copy link

@mrsaqibameen you published the email ID :) Remove this gist and make new and update the article, coz if you just edit it then it will be in the reversions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment