This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Java in General and the fly likes Detect SMTP server IP address Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Detect SMTP server IP address" Watch "Detect SMTP server IP address" New topic
Author

Detect SMTP server IP address

Manoj Tare
Greenhorn

Joined: Feb 04, 2003
Posts: 26
I want to find SMTP service running on a Network .
Currently in my application user has to give SMTP server IP address (which is hardcoded).
I want to give facility to detect SMTP server IP address automatically.
Is there any way to find out the same.
Please give some slutn.
in advance thx
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
hi
do u know the host name u mean for the SMTP server and want to find IP? (well that doesnt make sense though )
'coz otherwise knowing nothing we can't probably query where is SMTP server i guess
regards
maulin
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
If you want to identify the SMTP servers that service incoming mail to a specific domain, you'll want to query for MX records with a library like DNSJava. Note that when a domain has no MX records, you should try the IP of the domain itself.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Detect SMTP server IP address