# DNS lookup for MX record

**URL:** <https://clarionhub.com/t/dns-lookup-for-mx-record/7648>\
**Category:** questions\
**Tags:** nettalk, network, email\
**Created:** [November 6, 2024, 3:19pm UTC](https://clarionhub.com/t/dns-lookup-for-mx-record/7648 "2024-11-06T15:19:17Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ThaDaSoft](https://clarionhub.com/user_avatar/clarionhub.com/thadasoft/32/3743_2.png) [@ThaDaSoft](https://clarionhub.com/u/ThaDaSoft)\
**Post date:** [November 7, 2024, 8:53am UTC](https://clarionhub.com/t/dns-lookup-for-mx-record/7648/3 "2024-11-07T08:53:11Z")

</div>

Thanks, but how do I implement this in Clarion?  
I’ve found the following but it’s a bit hard to follow:

> [@Email validation using MATCH (RegEx)](https://clarionhub.com/t/email-validation-using-match-regex/1992/26):
>
> Hello Rudik .. Here is a sample showing how I query an MX record, extract whatever you need to make it your own. It is very quick taking no longer than any other DNS query. I use a .dll loader class so don’t prototype many procedures but you could use these: DnsQuery\_A( lpszName LONG, wType SHORT, options SHORT, lpExtra LONG, lpResults LONG, lpReserved LONG ),LONG,PASCAL,Name(‘DnsQuery\_A’) DnsRecordListFree(LONG p,LONG t),PASCAL,name(‘DnsRecordListFree’) Other prototypes .. memcpy(…

---

_[View the full topic](https://clarionhub.com/t/dns-lookup-for-mx-record/7648)._
