Unparalleled suite of productivity-boosting Web APIs & cloud-based micro-service applications for developers and companies of any size.

APIAutomationPythonSecurity

Easily Develop Automated Email Verification Systems With Python And REST

mailboxlayer api blog banner

What is mailboxlayer, and What Makes it Secure?

mailboxlayer is a free, simple, and powerful JSON API offering instant email address validation & verification via syntax checks, typo, and spelling checks, SMTP checks, free and disposable provider filtering, and much more. Its system is REST-based, secured by 256-bit HTTPS encryption, and pursuing the goal of assisting developers and businesses in fighting fraudulent users and increasing success rates of email campaigns.

The mailboxlayer API is an email validator api built and maintained by apilayer, an Austrian technology company aiming to build a variety of reliable programming interfaces (APIs) and make them affordable for developers and startups. Browse all available products at apilayer.

mailboxlayer comes with diverse API endpoints, functionalities, and options. This article provides demos for a scripting language (Python), interactive web-based dashboard (Jupyter Notebook), and desktop applications (Delphi).

 

Why should you use mailboxlayer for Developing an Automated Email Verification System?

  • Save your time and money to build an AI bot to verify the email addresses yourself. Just with a few lines of code, you can build the automation yourself, to retrieve the mailboxlayer API.
  • You can easily filter fake accounts and bad email addresses before running email marketings or updating and contacting your sales prospective database.
  • Mailboxlayer provides diverse API endpoints and reliable metrics to verify email addresses.  

The lists above are in line with our goal to assist developers and businesses in fighting fraudulent users and increasing success rates of email campaigns.

What Email Verification Endpoints are Available via the API?

In total the mailboxlayer API is offering 8 API endpoints, each with different functionalities. Here are their short summaries:

  1. Syntax Check: Perform a standard email syntax check, hence, verify its compliance with regular expression rules.
  2. Typo Check & Suggestions: Pose an alternative email suggestion within the API result sets (if we do a typo in the domain part of the requested email address).
  3. Real-time Verification: Verifies email addresses using the lookup of MX-Records and the use of SMTP, which is the very protocol we all use to move emails on and across networks.
  4. Catch-all Detection: After SMTP check, mailboxlayer API will perform a catch-all detection functionality (Since many email servers out there are configured to catch (receive) all incoming mail traffic, regardless of the requested email address’s local part). This feature is unavailable in the free subscription plan.
  5. Role Check: Detecting whether or not the requested email address is a role email address.
  6. Free Provider Check: Mailboxlayer API is hooked up to a daily updated database containing all available email providers, which means it can identify free email services like Gmail, Yahoo, etc!
  7. Disposable Provider Check: Check whether or not the requested email address is found to be using a disposable email provider like mailinator.com or trashmail.com 
  8. Quality Score: At the end of the verification, the API will return a numeric Quality Score ranging between 0 (Bad) and 1 (Good) reflecting the quality and deliverability of the requested email address.

How can I Access mailboxlayer API?

First, get your API Credentials here, and set up your subscription plan:

And you can monitor your usage via this dashboard.

API Access Key & Authentication

Next, to check if everything is working properly, just simply run this URL in your favorite web browser:

You will get this API response inside your browser:

Make an API Request

The API is really easy to use and just as simple as running the following URL in your favorite web browser:

You will get this API response inside your browser:

Each API response consists of 10 different response objects:

Object Description
“email” Contains the exact email address requested
“did_you_mean” Contains a did-you-mean suggestion in case a potential typo has been detected.
“user” Returns the local part of the request email address. (e.g. “paul” in “[email protected]”)
“domain” Returns the domain of the requested email address. (e.g. “company.com” in “[email protected]”)
“format_valid” Returns true or false depending on whether or not the general syntax of the requested email address is valid.
“mx_found” Returns true or false depending on whether or not MX-Records for the requested domain could be found.
“smtp_check” Returns true or false depending on whether or not the SMTP check of the requested email address succeeded.
“catch_all” Returns true or false depending on whether or not the requested email address is found to be part of a catch-all mailbox.
“role” Returns true or false depending on whether or not the requested email address is a role email address. (e.g. “[email protected]”, “[email protected]”)
“disposable” Returns true or false depending on whether or not the requested email address is a disposable email address. (e.g. “[email protected]”)
“free” Returns true or false depending on whether or not the requested email address is a free email address. (e.g. “[email protected]”, “[email protected]”)
“score” Returns a numeric score between 0 and 1 reflecting the quality and deliverability of the requested email address.

 

How can I Develop Automated Email Verification Systems with Python?

Use the following code to make an API request using Python, you can change the “[email protected]” value to any email you want to verify:

Here is the API response inside your Python interpreter:

You also can print out each parameter individually, or choose any parameter you like, like this:

Here is the API response inside your Python interpreter:

 

How can I Develop Interactive Web-Based Automated Email Verification Systems With Jupyter Notebook?

You can easily build an interactive web-based Automated Email Verification dashboard using Python scripts in the previous section, just by running them inside Jupyter Notebook. If you have never used Jupyter Notebook before, visit this link for an installation guide.

Here is the result:

How can I Make an API Request using Windows Delphi REST Debugger?

First, download the Delphi REST Debugger here.

Choose the GET method, and send the request to the following URL:

After getting the API responses you need, and you want to create Desktop apps based on it using Delphi, visit this blog post to get started:

https://blogs.embarcadero.com/using-apilayer-rest-apis-from-delphi/

How can I add email verification to my apps?

As you can see there are many automated email verification solutions provided by mailboxlayer REST API which can be connected to any platform and any programming languages. In this article, we show a demo of how you can use mailbox layer REST API for scripting, web, and desktop-based applications.

Take advantage of the free tier on Mailboxlayer and then upgrade if you need more powerful features to grow your business. We can’t wait to see what you build with our REST API!

Head over and sign up for free to start building automated email verification-based applications today.

Related posts
API

What Is an API Endpoint? What Does It Matter?

APILocation

Ipstack Case Study: How Airbnb Uses Geolocation IP Address for Listings

APIJavascript

How to Create a Phone Number Verification Web App Using Node.js

API

What Is Open API? Pros, Cons, and Examples

Leave a Reply

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