New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

email-smtp-verificator

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

email-smtp-verificator

A tool to verify an email address existence via SMTP

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Email SMTP Verificator

Based on bighappyworld's email-verify module.

Requirements

node.js >= 6.4.0

Usage

const emailSMTPVerificator = require('./email-smtp-verificator');

const verify = emailSMTPVerificator({ timeout: 12000 });

verify('example@mail.com')
  .then((info) => { console.log(info); })
  .catch(console.log); // empty or non-string email

Callback

The callback is a function that has an info object:

{
  email: string,
  verified: boolean,
  // error case attributes
  stage: integer, // stage at which the error occurred
  message: string // error message
}

Options

The options are:

{
  port : integer,// port to connect with defaults to 25
  sender : email, // sender address, defaults to name@example.org
  timeout : integer, // socket timeout defaults to 0 which is no timeout
  fqdn : domain, // used as part of the EHLO, defaults to mail.example.org
  ignore: // set an ending response code integer to ignore, such as 450 for greylisted emails
}

Flow

The basic flow has following stages:

  1. Validate it is a proper email address.
  2. Get the domain of the email and grab the DNS MX records for that domain.
  3. Create a TCP connection to the smtp-server. Connect to the next smpt-server in MX records list if connection to the current one fails.
  4. Send a EHLO message.
  5. Send a MAIL FROM message.
  6. Send a RCPT TO message. The result of email verification depends on the server's response at this stage.
  7. Send a QUIT message. Close the connection cleanly.

Keywords

FAQs

Package last updated on 05 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc