Skip to content

Instantly share code, notes, and snippets.

@mvrilo
Created September 14, 2012 15:15
Show Gist options
  • Save mvrilo/3722547 to your computer and use it in GitHub Desktop.
Save mvrilo/3722547 to your computer and use it in GitHub Desktop.
>> Resolv::DNS.new.getresources("gmail.com", Resolv::DNS::Resource::IN::MX).map { |dns| dns.exchange.to_s }
=> ["alt3.gmail-smtp-in.l.google.com", "alt4.gmail-smtp-in.l.google.com", "gmail-smtp-in.l.google.com", "alt1.gmail-smtp-in.l.google.com", "alt2.gmail-smtp-in.l.google.com"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment