Last active
July 19, 2018 21:39
-
-
Save saqibameen/f5ce65f9ca45e062b6d50d58a7e2ed3b to your computer and use it in GitHub Desktop.
Module to verify email addresses using Email Verification API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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" | |
} | |
*/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@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.