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 |
\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.
<?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. \"[email protected]\". 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;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
string | Email address to validate, e.g. "[email protected]". The input is a string so be sure to enclose it in double-quotes. |
\Swagger\Client\Model\AddressGetServersResponse
- 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]
\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.
<?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. \"[email protected]\". 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;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
string | Email address to validate, e.g. "[email protected]". The input is a string so be sure to enclose it in double-quotes. |
\Swagger\Client\Model\FullEmailValidationResponse
- 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]
\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.
<?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. \"[email protected]\". 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;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
value | string | Email address to validate, e.g. "[email protected]". The input is a string so be sure to enclose it in double-quotes. |
\Swagger\Client\Model\AddressVerifySyntaxOnlyResponse
- 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]