Return the number of mail exchange records for the current
host.
Syntax
object.MailExchanges
Remarks
The MailExchanges property returns the number of mail
exchange (MX) records for the current host specified by the
HostName property. This property can be used in conjunction
with the MailExchange property to enumerate the servers
responsible for accepting mail for a given domain.
Data Type
Integer (Int32)
Example
The following example places the all of the mail exchange records
for a specific host into a listbox:
Dim nIndex As Integer
List1.Clear
DnsClient1.HostName = Trim(Text1.Text)
For nIndex = 0 To DnsClient1.MailExchanges - 1
List1.AddItem DnsClient1.MailExchange(nIndex)
nIndex = nIndex + 1
Loop
See Also
HostName Property,
HostAddress Property,
NameServer Property,
MailExchange Property
|