Official ZeroBounce API v2 Wrapper:
Official PHP SDK:
User Contributed Libraries:
This is a PHP wrapper class example for the ZeroBounce API.
!
TLS V1.2 is required - This is available from PHP 5.5.19 and up.
EXAMPLE USAGE
The validation methods return objects on which you call get methods which return the relevant information. Please see the sample code on the right:
The validate and getCredits methods return objects from which you can easily retrieve properties the properties below.
PROPERTIES AND POSSIBLE VALUES RETURNED BY THE METHODS:
validate method
- PropertyPossible Values
- addressThe email address you are validating.
- statusvalidinvalidcatch-allunknownspamtrapabusedo_not_mail
- 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_addresstoxicdisposablerole_based_catch_all
- accountThe portion of the email address before the "@" symbol.
- domainThe portion of the email address after the "@" symbol.
- did_you_meanSuggestive fix for an email typo or [null]
- domain_age_daysAge of the email domain in days or [null].
- free_email[true/false] If the email comes from a free provider.
- mx_found[true/false] Does the domain have an MX record
- mx_recordThe preferred MX record of the domain or [null].
- smtp_providerThe SMTP Provider of the email or [null] (BETA).
- 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].
- 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
- processed_atThe UTC time the email was validated
GetCredit method
- PropertyPossible Values
- creditsThe 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.