What is one of the most valuable data formats? Email addresses. So many ads are nowadays done by e-mail and e-mail services require a quality level in e-mail lists. This means that you must be able to perform every type of validation. With mailboxlayer you can easily validate different aspects of an e-mail address in one simple call. Let's take a look at it!
- mailbox layer with which you can register for free
- mailboxlayer offers validation of e-mail formats
- mailboxlayer offers extra logic to let you know if the e-mail address is on a disposable domain or if the e-mail is a catchall
- mailboxlayer is trusted by Zillow and Intel
- mailboxlayer is from the same service provider for currency player, eversign and streetlayer
- Like other apilayer APIs, the mailbox box is incredibly easy to use
Using postbox layer
As with the other services of apilayer, mailboxlayer is easy to use. Enter a single call with an access code and an e-mail address to get important information about the e-mail address:
curl https://apilayer.net/api/check?access_key=MY_KEY &email=SOME_USER@davidwalsh.name & Smtp = 1 & Format = 1
This call presents a wealth of information:
Let's look at some important pieces of information in the response:
mx_found– Lots & # 39; parked & # 39; (also unused) domains do not set MX records, the records that provide e-mail routing. If no MX record is found for a domain, it is likely that the email address is not reliable.
format_valid– Many text formats have simple regular expressions for validation, but e-mail address validation is crazy – there are hundreds of regular expressions out there and many of them lack edge cases for a valid e-mail address. mail format.
disposable– Disposable e-mail addresses are popular for users, but can be harmful to your e-mail lists. Knowing which services are disposable can save you a lot of e-mail collisions and hassle.
score– mailboxlayer returns a combined score of the email address, based on a valid format, one-time status, a found MX score and other obvious factors.
did_you_mean– This is a useful function – you may be able to detect misspelled domains.
The information returned from the mailbox layer is invaluable.
If you're reluctant to use a third-party service to check e-mail addresses for privacy or other concerns, just swap out the username of the e-mail address:
// email = REAL_USER@davidwalsh.name var addressSplit = email.split (& # 39; @ & # 39;); addressSplit  = & # 39; MASKED_USER & # 39 ;; var maskedAddress = addressSplit.join (& # 39; & # 39;); // Make the request now
By exchanging the handle, you do not immediately reveal the true e-mail address, but you still get information about the domain.
Just like currencylayer and eversign, mailboxlayer is so easy to use. No complicated API calls or parameters – just one simple call to get all the information you need. These guys really hit the target with API design and usability!