@apilayer/mailboxlayer
v0.1.6
Published
Mailboxlayer offers email validation & verification JSON API for Developers
Downloads
4
Readme
mailboxlayer-go
Mailboxlayer offers email validation & verification JSON API for Developers
Installation
Using npm
npm require --save @apilayer/mailboxlayer
or yarn
yarn add @apilayer/mailboxlayer
Getting Started
Head over to Mailboxlayer and create an account. Copy access key from dashboard.
import Mailboxlayer from '@apilayer/mailboxlayer'
const useHTTPs = true
const layer = new Mailboxlayer("<your-access-key>", useHTTPs)
Check
Check validates a supplied email address.
Signature:
check(email: string, config: Config): Promise<Response>
Example:
const response = layer.check("[email protected]", {
smtp: true, // perform SMTP check on the email
catch_all: true, // check if the server catches all emails
})
console.log('response:', response)
Response:
{
"email": "[email protected]",
"did_you_mean": "",
"user": "support",
"domain": "apilayer.net",
"format_valid": true,
"mx_found": true,
"smtp_check": true,
"catch_all": false,
"role": true,
"disposable": false,
"free": false,
"score": 0.8
}