开发者

what method should be used?

开发者 https://www.devze.com 2023-01-20 03:44 出处:网络
For finding the ip address of the smtp server in java? I cant find the right api method. Thank开发者_Python百科 youInetAddress addr = InetAddress.getByName(hostname);

For finding the ip address of the smtp server in java? I cant find the right api method.

Thank开发者_Python百科 you


InetAddress addr = InetAddress.getByName(hostname);

See the docs. However, I'm not clear why you want to do this.


You must ask the system administrator as this is not standardized.

A frequent scenario on Linux-machines is that the machine itself knows how to send out mail. In that case you would use "127.0.0.1" as the SMTP host.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号