aspose file tools*
The moose likes Java in General and the fly likes nslookup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "nslookup" Watch "nslookup" New topic
Author

nslookup

Peter Straw
Ranch Hand

Joined: Jan 08, 2002
Posts: 79
I am currently using this code to test the validity of a domain name:-
String ipAddress = InetAddress.getByName("www.yahoo.com").getHostAddress();String hostName = InetAddress.getByName("216.109.125.71").getHostName();
Is it possible to set the type (like you would do with a command line nslookup) to mx, so that it tests for mail servers only?
Many thanks
Marcus Howarth
Ranch Hand

Joined: Jan 04, 2002
Posts: 37
Could you use InetSocketAddress and try the common ports for mail?
API


Marcus<br /> <br />SCJP, March '02
 
 
subject: nslookup