Verify and Validate Email Address in Real Time using PHP
Last modified on by
I received lot of requests from my readers regarding how to check email address exists or not in PHP. It help us to avoid invalid emails added into their database. In this tutorial, we can easily Verify and Validate Email Address in Real Time or not valid using Kickbox API
makes it easy to verify your email lists, or integrate email verification into your application with their API. Kickbox verifies email addresses using the Simple Mail Transfer Protocol (SMTP).
Step 1: Create a Free Kickbox Account
Getting started with Kickbox is free. Your account comes with . Click here to sign up.
After registration and login into Kickbox, you can see 100 free verifications added into your account
Step 2: Verifying Email Addresses With Kickbox API
Kickbox’s API can be integrated into your web applications to verify email addresses in real-time.
You need to Create a Verification App to generate an API key. I created the app with the name called “”
After created the APP, you can see the API with usage statistics overall. Please get the API from this dashboard
Step 3 : API usage in PHP Curl to Verify Email Address in Real Time
PHP code to validate email address using CURL. below code will convert json into php object
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
$apikey = "your api key";
$email = "firstname.lastname@example.org";
$url = 'https://api.kickbox.io/v2/verify?email='.$email.'&apikey='.$apikey;
$response = get_curl($url);
Response after executing kickbox API using PHP CURL
If the result field is then the email address is invalid
A successful API call responds with the following values:
string– The verification result:
string– The reason for the result. Possible reasons are:
invalid_email– Specified email is not a valid email address syntax
invalid_domain– Domain for email does not exist
rejected_email– Email address was rejected by the SMTP server, email address does not exist
accepted_email– Email address was accepted by the SMTP server
low_quality– Email address has quality issues that may make it a risky or low-value address
low_deliverability– Email address appears to be deliverable, but deliverability cannot be guaranteed
no_connect– Could not connect to SMTP server
timeout– SMTP session timed out
invalid_smtp– SMTP server returned an unexpected/invalid response
unavailable_smtp– SMTP server was unavailable to process our request
unexpected_error– An unexpected error has occurred
true | false– true if the email address is a role address (
true | false– true if the email address uses a free email service like gmail.com or yahoo.com.
true | false– true if the email address uses a disposable domain like trashmail.com or mailinator.com.
true | false– true if the email was accepted, but the domain appears to accept all emails addressed to that domain.
null | string– Returns a suggested email if a possible spelling error was detected. (
float– A quality score of the provided email address ranging between 0 (no quality) and 1 (perfect quality). More information on the Sendex Score can be found here.
string– Returns a normalized version of the provided email address. (
string– The user (a.k.a local part) of the provided email address. (
string– The domain of the provided email address. (
true | false– true if the API request was successful (i.e., no authentication or unexpected errors occurred)
The API is rate-limited to a maximum of 25 simultaneous connections per account. As you integrate the Kickbox API, ensure your application does not exceed this limit
Alternatively you can also use php library to verify email address – https://github.com/kickboxio/kickbox-php
You can also checkout Top 10 Bulk Email Verification and Validation Services Compared