Skip to content

synthetic-borealis/trollmail-detector

Repository files navigation

Trollmail Detector

Table of Contents

Overview

Trollmail detector is a RESTful API that validates e-mail addresses and compares and compares the domain they're associated with against a list of known throwaway e-mail provider domains.

Setting Up

  1. Install dependencies by running npm install from the root directory.
  2. Run echo PORT={PORT NUMBER} > .env (replace {PORT NUMBER} with a port number).
  3. Run yarn start to start the server.
  • Optional but highly recommended: Install pm2 and start the service by running pm2 start src/app.js.

Usage Examples

Example 1

Request:

{
  "email": "gordon.freeman@bmrf.com"
}

Response:

{
  "email": "gordon.freeman@bmrf.com",
  "status": "Valid"
}

Example 2

Request:

{
  "email": "gordon.freeman#bmrf.com"
}

Response:

{
  "email": "gordon.freeman#bmrf.com",
  "status": "NotAnEmail"
}

Example 3

Request:

{
  "email": "gordon.freeman@sharklasers.com"
}

Response:

{
  "email": "gordon.freeman@sharklasers.com",
  "status": "Blacklisted"
}