Smtp.ResolveDomainMX Method
Namespace: Rebex.Net
Assembly: Rebex.Smtp.dll (version 7.0.9448)
ResolveDomainMX(String)
Retrieves the list of domain's MX records from DNS and returns the list of hosts that accept its email (in order of preference).
Declaration
public static string[] ResolveDomainMX(string domain)
Parameters
| Type | Name | Description |
|---|---|---|
| String | domain | Mail domain to resolve. |
Returns
| Type | Description |
|---|---|
| String[] | 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
GetHostEntry is used to resolve
the domain into an IP address list.
Only supported on Windows platforms.
ResolveDomainMX(String, Int32)
Retrieves the list of domain's MX records from DNS and returns the list of hosts that accept its email (in order of preference).
Declaration
public static string[] ResolveDomainMX(string domain, int timeout)
Parameters
| Type | Name | Description |
|---|---|---|
| String | domain | Mail domain to resolve. |
| Int32 | timeout | Timeout for the operation (in milliseconds). |
Returns
| Type | Description |
|---|---|
| String[] | 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
GetHostEntry is used to resolve
the domain into an IP address list.
Only supported on Windows platforms.