Skip to content

Instantly share code, notes, and snippets.

@martyndavies
Created August 22, 2013 14:32
Show Gist options
  • Save martyndavies/6307971 to your computer and use it in GitHub Desktop.
Save martyndavies/6307971 to your computer and use it in GitHub Desktop.
var dns = require('dns');
module.exports = function(emailAddress, cb) {
'use strict';
var splitEmail = emailAddress.split('@');
dns.resolveMx(splitEmail[1], function(err, addresses){
if (addresses) {
cb(true, addresses);
} else {
cb(false, null);
}
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment