lib/rubymta/extended_classes.rb
# returns list of MX names, or nil
# (there may be multiple MX names for a domain)
# WARNING: use the #dig_mxs to get the preferences also
returns list of MX names, or nil
(there may be multiple MX names for a domain)
WARNING: use the #dig_mxs to get the preferences also
returns list of MX names or nil ( there may be multiple MX names for a domain ) WARNING : use the #dig_mxs to get the preferences also
def dig_mx
    Resolv::DNS.open do |dns|
      txts = dns.getresources(self,Resolv::DNS::Resource::IN::MX).collect { |r| r.exchange.to_s }
      if txts.empty? then nil else txts end
    end
  end
def dig_mx Resolv :: DNS . open do | dns | txts = dns . getresources ( self , Resolv :: DNS :: Resource :: IN :: MX ) . collect { | r | r . exchange . to_s } if txts . empty? then nil else txts end end end
returns list of MX names, or nil
(there may be multiple MX names for a domain)
WARNING: use the #dig_mxs to get the preferences also
returns list of MX names or nil ( there may be multiple MX names for a domain ) WARNING : use the #dig_mxs to get the preferences also