Hello Max,

> How to determine preferred (top priority) MX server
> 
> after calling TDNSQuery->MXLookup ?

There is property TDnsQuery->MXPreference for this purpose.

In event handler RequestDone do something like:

for I := 0 to QDns.ResponseANCount -1 do
    begin
        nIndex := DnsQuery.AnswerTag[I];
        MxServ := DnsQuery.MXExchange[nIndex];
        Pref   := DnsQuery.MXPreference[nIndex];
..

The server with the smallest preference value has top priority.

--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to