Retrieves the list of domain's MX records from DNS and returns the list of hosts that accept its email (in order of preference).

Namespace:  Rebex.Net
Assembly:  Rebex.Smtp (in Rebex.Smtp.dll)

Syntax

Visual Basic
Public Shared Function ResolveDomainMX ( _
	domain As String _
) As String()
C#
public static string[] ResolveDomainMX(
	string domain
)

Parameters

domain
Type: System..::..String
Mail domain to resolve.

Return Value

The list of hosts.

Remarks

If the specified domain is an IP address, no resolving is done. Also, no resolving is done if no DNS server is available.

This method tries to resolve domain's MX records by querying local computer's DNS servers. If no MX records are found, the Dns object's

 Copy imageCopy Code
GetHostEntry
is used to resolve the domain into an IP address list.

Only supported on Windows platforms.

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also