🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

email_checker

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

email_checker

0.0.4
Rubygems
Version published
Maintainers
1
Created
Source

Email Checker

Check if an email address can receive E-mails.

Installation

Add this line to your application's Gemfile:

gem 'email_checker'

And then execute:

$ bundle

Or install it yourself as:

$ gem install email_checker

How do this gem works

For an email address to receive e-mails, it has to meet the following:

  • The domain must have MX records.
  • The MX records must point to a valid server and
  • That server must have the corresponding A records.

Now, that does not ensure that the email actually exists in the server, for that, we have to pretend to send an e-mail and check if the seerver is OK with it (respond with status 250). If you want to read more about it you can read the RFC 821.

For this gem to pretend to send an email you have to provide a valid email address from whitch the email "will be sent". If you don't, the server might reject the message without checking if the email exists. In this gem that is the verifier_email.

It is noteworthy that this method can result in your server being blacklisted since its known as a spamming technique.

Usage

You can provide the verifier_email by passign it to the check method in the second parameter:

  EmailChecker.check(email, verifier_email=nil)

Or in an initializer:

  EmailChecker.config do |config|
    config.verifier_email = 'realname@realdomain.com'
  end

  EmailChecker.check(email)

Contributors

email_checker it's inspired on Kamilc email_verifier gem. The diference is that email_checker validates the domain MX records and its server before it pretends to send an email, this way it is less posible that your server get blacklisted.

Contributing

FAQs

Package last updated on 18 Dec 2015

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