The MXRecord class represents a Domain Name System (DNS) MX resource record containing a mail exchange server address.

MX resource records are returned by a DNSResolver object as a result of a DNS lookup on a domain name. More than one record can be returned by a single lookup if more than one mail exchange is available.

Constructor

new()

Creates an MX resource record.

MX records are obtained from a DNS lookup using the DNSResolver class. Application code should not create MXRecord objects.

Variables

exchange:String

The host name of a mail exchange service.

preference:Int

The priority of the mail exchange identified by this record.

Lower values are higher priority.

Inherited Variables

Defined by ResourceRecord

name:String

The query string used to look up this resource record.

ttl:Int

The resource time-to-live (ttl) value.

The length of time (in seconds) that the resource record is valid. Records should not be cached for longer than this value. A ttl of zero means the record is volatile and must not be cached. A ttl less than zero means that the resource record is not valid.

Inherited Methods