How to get mail server's IP address

Hi,

I’m working on Net OS 7.5.2 with connectme9210, I need send email to a mail server, how to get this mail server’s IP address, for example, if the mail server is smtp.gmail.com, how I can get it’s IP address?

Thanks

Jiaxin

Please take a look at Netos75\src\examples
adnsclnt
This example application demonstrates the DNS client API.

Also, check API reference guide C\Netos75\Documentation\ApiReference.chm,
Category: DNS/Domain Name Service
The Domain Name Service (DNS) API enables applications to access DNS servers on a network to translate DNS names into IP addresses. At most two DNS servers can be configured at one time.

As long as you know the name of the SMTP server, it is easy to find the IP address.

You can use the “ping” command to find your SMTP server IP address.
credit: Jupiterimages/Pixland/Getty Images
Step 1
Click “Start,” then “Run” and type “cmd” in the box that appears.

Step 2
Press enter. A command window will appear.

Step 3
Type “ping,” a space and then the name of your SMTP Server. For example, type “ping smtp.server.com” and press “Enter.” The window will then try to contact the SMTP server by the IP address. It will say, “Pinging x.x.x.x with 32 bytes of data.” The “x.x.x.x” will be the SMTP server’s IP address.