public static function getSmtpFromMx($mx) { reset(PostmanSmtpMappings::$mxMappings); while (list($domain, $smtp) = each(PostmanSmtpMappings::$mxMappings)) { if (PostmanUtils::endswith($mx, $domain)) { return $smtp; } } return false; }