Verify and Validate Email Address in Real Time using PHP

Last modified on by Karthikeyan K

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

Kickbox 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).

check out my popuplar article on How to Check Internet Connection Exists or Not using Javascript?

Step 1: Create a Free Kickbox Account

Getting started with Kickbox is free. Your account comes with 100 free verifications.  Click here to sign up.

After registration and login into Kickbox, you can see 100 free verifications added into your account

100 free email verifications

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.

Kickbox Verify API PHP

You need to Create a Verification App to generate an API key. I created the app with the name called “w3lessons

Email Verification App

After created the APP, you can see the API with usage statistics overall. Please get the API from this dashboard

API Key to call API

Step 3 : API usage in PHP Curl to Verify Email Address in Real Time

API EndPoint

PHP code to validate email address using CURL. below code will convert json into php object

function get_curl($url)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
return $result;

$apikey = "your api key";
$email = "";
$url = ''.$email.'&apikey='.$apikey;
$response = get_curl($url);

Response after executing kickbox API using PHP CURL


If the result field is undeliverable then the email address is invalid
A successful API call responds with the following values:

  • result string – The verification result: deliverable, undeliverable, risky, unknown
  • reason 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
  • roletrue | falsetrue if the email address is a role address (,, etc)
  • freetrue | falsetrue if the email address uses a free email service like or
  • disposable true | falsetrue if the email address uses a disposable domain like or
  • accept_all true | falsetrue if the email was accepted, but the domain appears to accept all emails addressed to that domain.
  • did_you_mean null | string – Returns a suggested email if a possible spelling error was detected. ( ->
  • sendex 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.
  • email string – Returns a normalized version of the provided email address. ( ->
  • user string – The user (a.k.a local part) of the provided email address. ( -> bob)
  • domain string – The domain of the provided email address. ( ->
  • success true | falsetrue 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 –

View Live Demo

You can also checkout Top 10 Bulk Email Verification and Validation Services Compared

You May Also Like

3 Responses

  1. Gabriel says:

    Awesome Post karthikeyan 🙂 I’m going to use this feature in my next web application to avoid invalid emails

  2. Tama san says:

    i dont understand can u share source share demo ?

Leave a Reply

Your email address will not be published. Required fields are marked *