Skip to content

MailServerControllerApi

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

Method HTTP request Description
describeMailServerDomain POST /mail-server/describe/domain Get DNS Mail Server records for a domain
getDnsLookup POST /mail-server/describe/dns-lookup Lookup DNS records for a domain
getIpAddress POST /mail-server/describe/ip-address Get IP address for a domain
verifyEmailAddress POST /mail-server/verify/email-address Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server.

DescribeMailServerDomainResult describeMailServerDomain(describeDomainOptions)

Get DNS Mail Server records for a domain

Example

// Import classes:
import com.mailslurp.clients.ApiClient;
import com.mailslurp.clients.ApiException;
import com.mailslurp.clients.Configuration;
import com.mailslurp.clients.auth.*;
import com.mailslurp.clients.models.*;
import com.mailslurp.apis.MailServerControllerApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://java.api.mailslurp.com");

    // Configure API key authorization: API_KEY
    ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
    API_KEY.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //API_KEY.setApiKeyPrefix("Token");

    MailServerControllerApi apiInstance = new MailServerControllerApi(defaultClient);
    DescribeDomainOptions describeDomainOptions = new DescribeDomainOptions(); // DescribeDomainOptions | 
    try {
      DescribeMailServerDomainResult result = apiInstance.describeMailServerDomain(describeDomainOptions);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling MailServerControllerApi#describeMailServerDomain");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
describeDomainOptions DescribeDomainOptions

Return type

DescribeMailServerDomainResult

Authorization

API_KEY

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

DNSLookupResults getDnsLookup(dnSLookupOptions)

Lookup DNS records for a domain

Example

// Import classes:
import com.mailslurp.clients.ApiClient;
import com.mailslurp.clients.ApiException;
import com.mailslurp.clients.Configuration;
import com.mailslurp.clients.auth.*;
import com.mailslurp.clients.models.*;
import com.mailslurp.apis.MailServerControllerApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://java.api.mailslurp.com");

    // Configure API key authorization: API_KEY
    ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
    API_KEY.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //API_KEY.setApiKeyPrefix("Token");

    MailServerControllerApi apiInstance = new MailServerControllerApi(defaultClient);
    DNSLookupOptions dnSLookupOptions = new DNSLookupOptions(); // DNSLookupOptions | 
    try {
      DNSLookupResults result = apiInstance.getDnsLookup(dnSLookupOptions);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling MailServerControllerApi#getDnsLookup");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
dnSLookupOptions DNSLookupOptions

Return type

DNSLookupResults

Authorization

API_KEY

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

IPAddressResult getIpAddress(name)

Get IP address for a domain

Example

// Import classes:
import com.mailslurp.clients.ApiClient;
import com.mailslurp.clients.ApiException;
import com.mailslurp.clients.Configuration;
import com.mailslurp.clients.auth.*;
import com.mailslurp.clients.models.*;
import com.mailslurp.apis.MailServerControllerApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://java.api.mailslurp.com");

    // Configure API key authorization: API_KEY
    ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
    API_KEY.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //API_KEY.setApiKeyPrefix("Token");

    MailServerControllerApi apiInstance = new MailServerControllerApi(defaultClient);
    String name = "name_example"; // String | 
    try {
      IPAddressResult result = apiInstance.getIpAddress(name);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling MailServerControllerApi#getIpAddress");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
name String

Return type

IPAddressResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

EmailVerificationResult verifyEmailAddress(verifyEmailAddressOptions)

Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server.

Example

// Import classes:
import com.mailslurp.clients.ApiClient;
import com.mailslurp.clients.ApiException;
import com.mailslurp.clients.Configuration;
import com.mailslurp.clients.auth.*;
import com.mailslurp.clients.models.*;
import com.mailslurp.apis.MailServerControllerApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://java.api.mailslurp.com");

    // Configure API key authorization: API_KEY
    ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
    API_KEY.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //API_KEY.setApiKeyPrefix("Token");

    MailServerControllerApi apiInstance = new MailServerControllerApi(defaultClient);
    VerifyEmailAddressOptions verifyEmailAddressOptions = new VerifyEmailAddressOptions(); // VerifyEmailAddressOptions | 
    try {
      EmailVerificationResult result = apiInstance.verifyEmailAddress(verifyEmailAddressOptions);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling MailServerControllerApi#verifyEmailAddress");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
verifyEmailAddressOptions VerifyEmailAddressOptions

Return type

EmailVerificationResult

Authorization

API_KEY

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -