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("support@apilayer.com", {
smtp: true,
catch_all: true,
})
console.log('response:', response)
Response:
{
"email": "support@apilayer.com",
"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
}
License
MIT