MailSlurpMailServerControllerApi

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

MethodHTTP requestDescription
describeMailServerDomainPOST /mail-server/describe/domainGet DNS Mail Server records for a domain
getDnsLookupPOST /mail-server/describe/dns-lookupLookup DNS records for a domain
getIpAddressPOST /mail-server/describe/ip-addressGet IP address for a domain
verifyEmailAddressPOST /mail-server/verify/email-addressVerify the existence of an email address at a given mail server.

describeMailServerDomain

MailSlurpModelsDescribeMailServerDomainResult describeMailServerDomain($describe_options)

Get DNS Mail Server records for a domain

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new MailSlurpApiMailServerControllerApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
    // This is optional, `GuzzleHttpClient` will be used as default.
    new GuzzleHttpClient(),
    $config
);
$describe_options = new MailSlurpModelsDescribeDomainOptions(); // MailSlurpModelsDescribeDomainOptions | describeOptions

try {
    $result = $apiInstance->describeMailServerDomain($describe_options);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MailServerControllerApi->describeMailServerDomain: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
describe_optionsMailSlurpModelsDescribeDomainOptionsdescribeOptions

Return type

MailSlurpModelsDescribeMailServerDomainResult

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

getDnsLookup

MailSlurpModelsDNSLookupResults getDnsLookup($dns_lookup_options)

Lookup DNS records for a domain

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new MailSlurpApiMailServerControllerApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
    // This is optional, `GuzzleHttpClient` will be used as default.
    new GuzzleHttpClient(),
    $config
);
$dns_lookup_options = new MailSlurpModelsDNSLookupOptions(); // MailSlurpModelsDNSLookupOptions | dnsLookupOptions

try {
    $result = $apiInstance->getDnsLookup($dns_lookup_options);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MailServerControllerApi->getDnsLookup: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
dns_lookup_optionsMailSlurpModelsDNSLookupOptionsdnsLookupOptions

Return type

MailSlurpModelsDNSLookupResults

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

getIpAddress

MailSlurpModelsIPAddressResult getIpAddress($name)

Get IP address for a domain

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new MailSlurpApiMailServerControllerApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
    // This is optional, `GuzzleHttpClient` will be used as default.
    new GuzzleHttpClient(),
    $config
);
$name = 'name_example'; // string | name

try {
    $result = $apiInstance->getIpAddress($name);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MailServerControllerApi->getIpAddress: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
namestringname

Return type

MailSlurpModelsIPAddressResult

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

verifyEmailAddress

MailSlurpModelsEmailVerificationResult verifyEmailAddress($verify_options)

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

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new MailSlurpApiMailServerControllerApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
    // This is optional, `GuzzleHttpClient` will be used as default.
    new GuzzleHttpClient(),
    $config
);
$verify_options = new MailSlurpModelsVerifyEmailAddressOptions(); // MailSlurpModelsVerifyEmailAddressOptions | verifyOptions

try {
    $result = $apiInstance->verifyEmailAddress($verify_options);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MailServerControllerApi->verifyEmailAddress: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
verify_optionsMailSlurpModelsVerifyEmailAddressOptionsverifyOptions

Return type

MailSlurpModelsEmailVerificationResult

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]