Topic Path: Symbol Reference > Classes > TMXRecord Class
TMXRecord Class

Represents a resource record returned from a DNS query that includes Mail Exchange resource record types.

TMXRecord = class(TResultRecord);

TMXRecord is a TResultRecord descendant that represents a resource record returned in the results for a DNS query. TMXRecord is a collection item created to represent a resource resource returned when TIDNSResolver.QueryRecords includes the value qtMX for Mail Exchange resource records. 

Mail Exchange resoure records are used to determine the host serfver that can accept mail for the specified domain name. Mail Exchange resoure records also contain information about preference values which rank the hosts according to an order specified by the administrators for the domain. 

A Mail Exchange resource record uses the same DNS packet layout as other TResultRecord-based responses, but extends the use of RData to include the following definition and format: 


  • PREFERENCE - 16-bit integer which specifies the preference given to this resource record among others at the same owner. Lower values indicate a higher preference.

  • EXCHANGE - Variable length Domain name which specifies a host willing to act as a mail exchange for the owner.

Using a DNS query that includes Mail Exchange resource record type may result in additional TARecord resource records being processed for the ExchangeServer specified. The use of Mail Exchange resource records is explained in detail in RFC 974. 

TMXRecord extends TResultRecord to implement the specifics of accessing RData values as properties, including ExchangeServer and Preference

TMXRecord also overrides the Parse method to read the values in RData into their property counterparts.

TResultRecord TQueryResult TIdDNSResolver.QueryRecords

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.