Results 1 to 2 of 2
- 08-05-2008, 11:26 PM #1
Member
- Join Date
- Jul 2008
- Posts
- 7
- Rep Power
- 0
Return onyl 1 MX record if numerous exist
Hi there,
I have wrote the code below to perform an MXLookup on a give host.
Is there a way to return only 1 (Preferably the first) mx record, rather than all that exist.
Reason being I want to use a returned mx record for another method
ThanksJava Code:public static void getMX(String domainName) throws NamingException { InitialDirContext ictx = new InitialDirContext(); Attributes attributes = ictx.getAttributes("dns:/" + domainName, new String[] {"MX"}); Attribute attributeMX = attributes.get("MX"); System.out.println(attributeMX); }
- 08-05-2008, 11:41 PM #2
Member
- Join Date
- Jul 2008
- Posts
- 7
- Rep Power
- 0
Similar Threads
-
Can't record sound
By bozovilla in forum Java AppletsReplies: 12Last Post: 08-04-2008, 03:57 PM -
problem with viewing .java files when Visual J# 2005 Express Edition exist
By unhurt in forum New To JavaReplies: 3Last Post: 11-03-2007, 01:58 PM -
selecting a record in database
By ramachandran in forum New To JavaReplies: 0Last Post: 10-25-2007, 07:06 AM -
: /home/siom/siom/src/inm/siom/dni/EJB/META-INF/manifiestoSIOM.mf does not exist.
By Peter in forum NetBeansReplies: 2Last Post: 07-02-2007, 06:48 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks