Created
January 29, 2016 09:16
-
-
Save dineshsprabu/2ad85cd559a7fd5da530 to your computer and use it in GitHub Desktop.
Check MX Record for domains
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
/* npm install dns */ | |
var dns = require('dns'); | |
/* domain name to check for record */ | |
domain_name = '<domain-name>'; | |
/* dns.resolveMx can do the job for us */ | |
dns.resolveMx(domain_name, function(err, addresses){ | |
if(err){ return console.log(err.stack);} | |
console.log(addresses); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment