class Resolv::DNS::Resource::MX - Documentation for Ruby 3.4
Description: class Resolv::DNS::Resource::MX: Mail Exchanger resource.
Keywords: ruby,class,Resolv::DNS::Resource::MX

# class Resolv::DNS::Resource::MX

Mail Exchanger resource.

### Attributes

exchange [R]

The host of this `MX`.

preference [R]

The preference for this `MX`.

### Public Class Methods

new (preference, exchange)
Source

    # File lib/resolv.rb, line 2425
    def initialize(preference, exchange)
      @preference = preference
      @exchange = exchange
    end

Creates a new `MX` record with `preference`, accepting mail at `exchange`.