0.1.6 • Published 5 years ago

@apilayer/mailboxlayer v0.1.6

Weekly downloads
6
License
MIT
Repository
-
Last release
5 years ago

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, // perform SMTP check on the email
	catch_all: true, // check if the server catches all emails
})

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