This file contains hidden or 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
function MXLookup(domain) { | |
try { | |
var url = "https://dns.google.com/resolve?name=%FQDN%&type=MX".replace("%FQDN%",domain); | |
//var url = "https://dns.google.com/resolve?name=e-mercy.com&type=MX"; // USED FOR TESTING ONLY | |
Utilities.sleep(100); | |
var result = UrlFetchApp.fetch(url,{muteHttpExceptions:true}); | |
var rc = result.getResponseCode(); |