Skip to content

Latest commit

 

History

History
176 lines (124 loc) · 6.96 KB

File metadata and controls

176 lines (124 loc) · 6.96 KB

Swagger\Client\EmailApi

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

Method HTTP request Description
emailAddressGetServers POST /validate/email/address/servers Partially check whether an email address is valid
emailFullValidation POST /validate/email/address/full Fully validate an email address
emailPost POST /validate/email/address/syntaxOnly Validate email adddress for syntactic correctness only

emailAddressGetServers

\Swagger\Client\Model\AddressGetServersResponse emailAddressGetServers($email)

Partially check whether an email address is valid

Validate an email address by identifying whether its parent domain has email servers defined. This call is less limited than syntaxOnly but not as comprehensive as address/full.

Example

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

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');

$apiInstance = new Swagger\Client\Api\EmailApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$email = "email_example"; // string | Email address to validate, e.g. \"support@cloudmersive.com\".    The input is a string so be sure to enclose it in double-quotes.

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

Parameters

Name Type Description Notes
email string Email address to validate, e.g. &quot;support@cloudmersive.com&quot;. The input is a string so be sure to enclose it in double-quotes.

Return type

\Swagger\Client\Model\AddressGetServersResponse

Authorization

Apikey

HTTP request headers

  • Content-Type: application/json, text/json
  • Accept: application/json, text/json, application/xml, text/xml

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

emailFullValidation

\Swagger\Client\Model\FullEmailValidationResponse emailFullValidation($email)

Fully validate an email address

Performs a full validation of the email address. Checks for syntactic correctness, identifies the mail server in question if any, and then contacts the email server to validate the existence of the account - without sending any emails.

Example

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

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');

$apiInstance = new Swagger\Client\Api\EmailApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$email = "email_example"; // string | Email address to validate, e.g. \"support@cloudmersive.com\".    The input is a string so be sure to enclose it in double-quotes.

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

Parameters

Name Type Description Notes
email string Email address to validate, e.g. &quot;support@cloudmersive.com&quot;. The input is a string so be sure to enclose it in double-quotes.

Return type

\Swagger\Client\Model\FullEmailValidationResponse

Authorization

Apikey

HTTP request headers

  • Content-Type: application/json, text/json
  • Accept: application/json, text/json, application/xml, text/xml

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

emailPost

\Swagger\Client\Model\AddressVerifySyntaxOnlyResponse emailPost($value)

Validate email adddress for syntactic correctness only

Validate whether a given email address is syntactically correct via a limited local-only check. Use the address/full API to do a full validation.

Example

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

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');

$apiInstance = new Swagger\Client\Api\EmailApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$value = "value_example"; // string | Email address to validate, e.g. \"support@cloudmersive.com\".    The input is a string so be sure to enclose it in double-quotes.

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

Parameters

Name Type Description Notes
value string Email address to validate, e.g. &quot;support@cloudmersive.com&quot;. The input is a string so be sure to enclose it in double-quotes.

Return type

\Swagger\Client\Model\AddressVerifySyntaxOnlyResponse

Authorization

Apikey

HTTP request headers

  • Content-Type: application/json, text/json
  • Accept: application/json, text/json, application/xml, text/xml

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