See it in Action!
There are plenty of important reasons to validate email addresses before using them:
- Sending emails to fake or non-existent addresses can hurt your deliverability.
- Mistyped email addresses can prevent users from confirming accounts or resetting passwords.
- Valid email addresses help you stay connected with your users.
Test it
First, sign up for Mailboxlayer to get your API access key. A free plan is available. Then, test the API using the following cURL command.
curl --request GET \
--url 'https://api.apilayer.net/mailboxlayer/api/check?email=customercare@apilayer.com&access_key=YOUR_ACCESS_KEY'
That's it! Check the Mailboxlayer documentation for more information.
How it works
Mailboxlayer is an email verification API that helps you assess whether an email address is properly formatted and likely to be deliverable. It checks email syntax, validates DNS records for mail exchange (MX), and performs SMTP checks to assess mailbox availability without sending an email.
By combining these checks with typo detection and disposable email provider detection, Mailboxlayer helps you identify potentially invalid or low-quality email addresses. However, SMTP verification has limitations, and some mail servers may not reveal whether a specific mailbox exists.
What information is provided with the API?
Mailboxlayer returns a range of useful data points to help you evaluate email addresses:
format_valid: Indicates whether the email address has a valid format.
smtp_check: Indicates the result of the SMTP verification check.
mx_found: Indicates whether the domain has mail exchange (MX) records.
disposable: Identifies whether the email address belongs to a disposable email provider, such as Mailinator.
role: Indicates whether the email address is associated with a role-based account, such as support@domain.com or hello@domain.com.
catch_all: Indicates whether the domain uses a catch-all mail server that may accept messages addressed to non-existent mailboxes.
free: Identifies whether the email address belongs to a free email provider.
did_you_mean: Suggests a possible correction when an email address contains a typo, such as a misspelled domain.
score: Provides a quality score between 0 and 1 to help assess the email address's overall quality and potential deliverability.