Add DomainResource
class to wrap MX lookup/normalize (#32864)
This commit is contained in:
parent
e8b6607ece
commit
62d65504f6
6 changed files with 46 additions and 19 deletions
|
@ -58,10 +58,7 @@ module Admin
|
|||
private
|
||||
|
||||
def set_resolved_records
|
||||
Resolv::DNS.open do |dns|
|
||||
dns.timeouts = 5
|
||||
@resolved_records = dns.getresources(@email_domain_block.domain, Resolv::DNS::Resource::IN::MX).to_a
|
||||
end
|
||||
@resolved_records = DomainResource.new(@email_domain_block.domain).mx
|
||||
end
|
||||
|
||||
def resource_params
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue