# How to get mail server's IP address

**URL:** <https://forums.digi.com/t/how-to-get-mail-servers-ip-address/20114>\
**Category:** NET+OS\
**Tags:** smtp\
**Created:** [December 20, 2018, 5:16pm UTC](https://forums.digi.com/t/how-to-get-mail-servers-ip-address/20114 "2018-12-20T17:16:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiaxins](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@jiaxins](https://forums.digi.com/u/jiaxins)\
**Post date:** [December 20, 2018, 5:16pm UTC](https://forums.digi.com/t/how-to-get-mail-servers-ip-address/20114/1 "2018-12-20T17:16:42Z")

</div>

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](http://smtp.gmail.com), how I can get it’s IP address?

Thanks

Jiaxin

---

<div class="post-metadata">

**Author:** ![LeonidM](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@LeonidM](https://forums.digi.com/u/LeonidM)\
**Post date:** [December 21, 2018, 3:00pm UTC](https://forums.digi.com/t/how-to-get-mail-servers-ip-address/20114/2 "2018-12-21T15:00:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JustinFolk](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@JustinFolk](https://forums.digi.com/u/JustinFolk)\
**Post date:** [April 19, 2019, 9:48am UTC](https://forums.digi.com/t/how-to-get-mail-servers-ip-address/20114/3 "2019-04-19T09:48:52Z")

</div>

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](http://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.
