• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

nslookup

 
Peter Straw
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 38
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you use InetSocketAddress and try the common ports for mail?
API
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic