MailSlurpClient::MailServerControllerApi

All URIs are relative to https://api.mailslurp.com

MethodHTTP requestDescription
describe_mail_server_domainPOST /mail-server/describe/domainGet DNS Mail Server records for a domain
get_dns_lookupPOST /mail-server/describe/dns-lookupLookup DNS records for a domain
get_ip_addressPOST /mail-server/describe/ip-addressGet IP address for a domain
verify_email_addressPOST /mail-server/verify/email-addressVerify the existence of an email address at a given mail server.

describe_mail_server_domain

DescribeMailServerDomainResult describe_mail_server_domain(describe_options)

Get DNS Mail Server records for a domain

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::MailServerControllerApi.new
describe_options = MailSlurpClient::DescribeDomainOptions.new # DescribeDomainOptions | describeOptions

begin
  #Get DNS Mail Server records for a domain
  result = api_instance.describe_mail_server_domain(describe_options)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling MailServerControllerApi->describe_mail_server_domain: #{e}"
end

Parameters

NameTypeDescriptionNotes
describe_optionsDescribeDomainOptionsdescribeOptions

Return type

DescribeMailServerDomainResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

get_dns_lookup

DNSLookupResults get_dns_lookup(dns_lookup_options)

Lookup DNS records for a domain

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::MailServerControllerApi.new
dns_lookup_options = MailSlurpClient::DNSLookupOptions.new # DNSLookupOptions | dnsLookupOptions

begin
  #Lookup DNS records for a domain
  result = api_instance.get_dns_lookup(dns_lookup_options)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling MailServerControllerApi->get_dns_lookup: #{e}"
end

Parameters

NameTypeDescriptionNotes
dns_lookup_optionsDNSLookupOptionsdnsLookupOptions

Return type

DNSLookupResults

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

get_ip_address

IPAddressResult get_ip_address(name)

Get IP address for a domain

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::MailServerControllerApi.new
name = 'name_example' # String | name

begin
  #Get IP address for a domain
  result = api_instance.get_ip_address(name)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling MailServerControllerApi->get_ip_address: #{e}"
end

Parameters

NameTypeDescriptionNotes
nameStringname

Return type

IPAddressResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

verify_email_address

EmailVerificationResult verify_email_address(verify_options)

Verify the existence of an email address at a given mail server.

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::MailServerControllerApi.new
verify_options = MailSlurpClient::VerifyEmailAddressOptions.new # VerifyEmailAddressOptions | verifyOptions

begin
  #Verify the existence of an email address at a given mail server.
  result = api_instance.verify_email_address(verify_options)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling MailServerControllerApi->verify_email_address: #{e}"
end

Parameters

NameTypeDescriptionNotes
verify_optionsVerifyEmailAddressOptionsverifyOptions

Return type

EmailVerificationResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json