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 |
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.
// 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();
}
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. |
- Content-Type: application/json, text/json
- Accept: application/json, text/json, application/xml, text/xml
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.
// 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();
}
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. |
- Content-Type: application/json, text/json
- Accept: application/json, text/json, application/xml, text/xml
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.
// 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();
}
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. |
AddressVerifySyntaxOnlyResponse
- Content-Type: application/json, text/json
- Accept: application/json, text/json, application/xml, text/xml