Skip to content

MailSlurp\MailServerControllerApi

All URIs are relative to https://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.

describeMailServerDomain

MailSlurpModelsDescribeMailServerDomainResult describeMailServerDomain($describe_domain_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_domain_options = new MailSlurpModelsDescribeDomainOptions(); // MailSlurpModelsDescribeDomainOptions | 

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

Parameters

Name Type Description Notes
describe_domain_options MailSlurpModelsDescribeDomainOptions

Return type

MailSlurpModelsDescribeMailServerDomainResult

Authorization

API_KEY

HTTP request headers

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

[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 | 

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

Parameters

Name Type Description Notes
dns_lookup_options MailSlurpModelsDNSLookupOptions

Return type

MailSlurpModelsDNSLookupResults

Authorization

API_KEY

HTTP request headers

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

[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 | 

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

Parameters

Name Type Description Notes
name string

Return type

MailSlurpModelsIPAddressResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

verifyEmailAddress

MailSlurpModelsEmailVerificationResult verifyEmailAddress($verify_email_address_options)

Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. 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_email_address_options = new MailSlurpModelsVerifyEmailAddressOptions(); // MailSlurpModelsVerifyEmailAddressOptions | 

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

Parameters

Name Type Description Notes
verify_email_address_options MailSlurpModelsVerifyEmailAddressOptions

Return type

MailSlurpModelsEmailVerificationResult

Authorization

API_KEY

HTTP request headers

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

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