aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes finding IP address Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "finding IP address " Watch "finding IP address " New topic
Author

finding IP address

SP Nam
Ranch Hand

Joined: Oct 15, 2003
Posts: 41
How to find IP address by sending smtp (esmtp) commands to various mail servers which run on smtp, code help please
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

You're asking how to find mail servers, or, once you're connected to a mail server, how to find its address?
Note that without the address, you can't connect to the mail server, so I'm really not sure what you're asking. Can you rephrase the question?


[Jess in Action][AskingGoodQuestions]
SP Nam
Ranch Hand

Joined: Oct 15, 2003
Posts: 41
Once I connected to mailserver how to get IPAddress is my point, Is there any code to get IPAddress once connected to mail server
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Well, you've got a Socket, right? Call getInetAddress() on the Socket.
But if you don't know the address, how could you possibly have connected to the server in the first place?

Maybe this is a JavaMail question. Are we talking about JavaMail?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: finding IP address