Java
This is a java wrapper class example for the ZeroBounce API v2.
The project has 2 dependencies:
Apache HttpClient
JSON (org.json)
Either download the dependencies separately and add them to the relevant path or add the following dependencies to your pom.xml file if you're building via Maven (already added if you're cloning this repo):
Validate(email) method:
- PropertiesPossible Values
- getEmailAddress()The email address you are validating.
- getStatus()ValidInvalidCatch-AllUnknownSpamtrapAbuseDoNotMail
- getSubStatus()antispam_systemgreylistedmail_server_temporary_errorforcible_disconnectmail_server_did_not_respondtimeout_exceededfailed_smtp_connectionmailbox_quota_exceededexception_occurredpossible_traprole_basedglobal_suppressionmailbox_not_foundno_dns_entriesfailed_syntax_checkpossible_typounroutable_ip_addressunroutable_ip_addressleading_period_removeddoes_not_accept_mailalias_addressrole_based_catch_all
- getAccount()The portion of the email address before the "@" symbol.
- getDomain()The portion of the email address after the "@" symbol.
- getDidYouMean()Suggestive Fix for an email typo or [null]
- getDomainAgeDays()Age of the email domain in days or [null].
- isFreeEmail()[true/false] If the email comes from a free provider.
- isMXFound()[true/false] Does the domain have an MX record
- getMXRecord()The preferred MX record of the domain or [null].
- getSMTPProvider()The SMTP Provider of the email or [null] (BETA).
- getFirstName()The first name of the owner of the email when available or [null].
- getLastName()The last name of the owner of the email when available or [null].
- getGender()The gender of the owner of the email when available or [null].
- getCountry()The country the IP address is from.
- getCity()The city the IP address is from.
- getZipcode()The zip code the IP address is from.
- getRegion()The region/state the IP address is from.
- getProcessedAt()The UTC time the email was validated.
getCredit() method
- PropertiesPossible Values
- getCredits()The number of credits left in account for email validation
Status Code Documentation
Please visit our Status Code Documentation for an explanation of each status.
Sandbox Mode
To test out or API without using credits - Please use the emails provided in our sandbox documentation.
.Net
You can find the ZeroBounce .NET API Wrapper on our GitHub - .NET API repository.
You can also easily consume and keep it updated within your Visual Studio Project with Nuget Package Manager: https://www.nuget.org/packages/ZeroBounceAPIWrapper/ to find more details about URL
This wrapper class takes all the work out of coding against the API and allows you to easily set properties and get results instantly.
The .NET API Wrapper takes these input parameters.
.NET API input parameters
- PropertiesPossible Values
- apiKeyThe api key located in your account dashboard.
- emailToValidateThe email address your validating.
- ipAddress[optional] - The IP Address the email address was captured from
- requestTimeOutTimeout settings in milliseconds, setting this enables you to control how long you are willing to wait for to send the request to the API. When the timeout occurs an "Unknown" result is returned.
- readTimeOutThe timeout settings in milliseconds, setting this enables you to control how long you are willing to wait for the API to respond to your request. When the timeout occurs an "Unknown" result is returned.
The ValidateEmail and GetCredit methods return objects from which you can easily retrieve properties the properties below.
PROPERTIES AND POSSIBLE VALUES RETURNED BY THE METHODS:
Validate(email)_method:
- PropertiesPossible Values
- addressThe email address you are validating.
- statusValidInvalidCatch-AllUnknownSpamtrapAbuseDoNotMail
- sub_statusantispam_systemgreylistedmail_server_temporary_errorforcible_disconnectmail_server_did_not_respondtimeout_exceededfailed_smtp_connectionmailbox_quota_exceededexception_occurredpossible_traprole_basedglobal_suppressionmailbox_not_foundno_dns_entriesfailed_syntax_checkpossible_typounroutable_ip_addressleading_period_removeddoes_not_accept_mailalias_address
- accountThe portion of the email address before the "@" symbol.
- domainThe portion of the email address after the "@" symbol.
- disposable[true/false] If the email domain is disposable, which are usually temporary email addresses.
- firstnameThe first name of the owner of the email when available or [null].
- lastnameThe last name of the owner of the email when available or [null].
- genderThe gender of the owner of the email when available or [null].
- creationDateThe creation date or [null].
- locationThe location of the owner of the email when available or [null].
- processedAtThe UTC time the email was validated.
These additional properties are available when you set the ipAddress property.
- PropertiesPossible Values
- countryThe country the IP address is from.
- regionThe state/region the IP address is from
- cityThe city the IP address is from
- zipcodeThe Zip Code the IP address is from
GetCredit method
- PropertiesPossible Values
- creditsThe number of credits left in account for email validation.
VISUAL BASIC
C#
Status Code Documentation
Please visit our Status Code Documentation for an explanation of each status.
Sandbox Mode
To test out or API without using credits - Please use the emails provided in our sandbox documentation.
.Net Core
User Contributed .NET Core Wrapper(s)
https://github.com/bkrauska/zerobounce-dotnetcore-api to find more details about URL