This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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


Win a copy of Building Microservices this week in the Design forum!
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: 24190
    
  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: 24190
    
  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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: finding IP address
 
jQuery in Action, 3rd edition