Skip to content

Latest commit

 

History

History
176 lines (127 loc) · 6.5 KB

EmailApi.md

File metadata and controls

176 lines (127 loc) · 6.5 KB

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

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

// Import classes:
//import com.cloudmersive.client.invoker.ApiClient;
//import com.cloudmersive.client.invoker.ApiException;
//import com.cloudmersive.client.invoker.Configuration;
//import com.cloudmersive.client.invoker.auth.*;
//import com.cloudmersive.client.EmailApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

EmailApi apiInstance = new EmailApi();
String 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 {
    AddressGetServersResponse result = apiInstance.emailAddressGetServers(email);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EmailApi#emailAddressGetServers");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
email String Email address to validate, e.g. "[email protected]". The input is a string so be sure to enclose it in double-quotes.

Return type

AddressGetServersResponse

Authorization

Apikey

HTTP request headers

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

emailFullValidation

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

// Import classes:
//import com.cloudmersive.client.invoker.ApiClient;
//import com.cloudmersive.client.invoker.ApiException;
//import com.cloudmersive.client.invoker.Configuration;
//import com.cloudmersive.client.invoker.auth.*;
//import com.cloudmersive.client.EmailApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

EmailApi apiInstance = new EmailApi();
String 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 {
    FullEmailValidationResponse result = apiInstance.emailFullValidation(email);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EmailApi#emailFullValidation");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
email String Email address to validate, e.g. "[email protected]". The input is a string so be sure to enclose it in double-quotes.

Return type

FullEmailValidationResponse

Authorization

Apikey

HTTP request headers

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

emailPost

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

// Import classes:
//import com.cloudmersive.client.invoker.ApiClient;
//import com.cloudmersive.client.invoker.ApiException;
//import com.cloudmersive.client.invoker.Configuration;
//import com.cloudmersive.client.invoker.auth.*;
//import com.cloudmersive.client.EmailApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

EmailApi apiInstance = new EmailApi();
String 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 {
    AddressVerifySyntaxOnlyResponse result = apiInstance.emailPost(value);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EmailApi#emailPost");
    e.printStackTrace();
}

Parameters

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.

Return type

AddressVerifySyntaxOnlyResponse

Authorization

Apikey

HTTP request headers

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