Git Product home page Git Product logo

email-authentication's Introduction

Build Status Code Climate Gem Version

email-authentication gem

Given an email address, check to see if it is valid. Check the structure of the address, MX record of the domain and if the domain accepts the SMTP connection and the recipient address. Checking the smtp connection is unique to this gem that I am aware of.

NaySayers Read here

It is NOT possible to verify an email address unless you send an email to it. And even then you may get a transient bounce. This gem tries its best to check to see if the address is valid. But is DOES NOT guarantee validity. Then why this gem? Because sometimes you receive a list of email addresses [when you are at a tradeshow and someone types in the wrong addresses etc.] and you want to test them before adding to an email service provider list so your account is not blocked due to failing addresses. This gem helps in that process

Alternatives

See validates_email_format_of gem

Usage case

Let's say you are using Amazon SES and you want to validate your email addresses before you send via SES (or any other provider). Amazon is quite particular about bounce rates and checking your list prior to sending via SES can prevent your account from being blocked.

Simplest usage

To test an email address via a class call. It returns boolean if success and a list of messages

success,msgs=EmailAuthentication::Base.check('an email adresss','from address')

Use gem

To test an email address. It returns boolean true if success and a list of messages from the tests. The messages are primarily used to check on where the address is failing.

@f=EmailAuthentication::Base.new
success,[email protected]('an email adresss','from address')

Use just a portion of gem

If you just want to use a portion of the gem (eg check_mx record) then just set the address and call the check function (also see check_smtp)

@f=EmailAuthentication::Base.new
@f.set_address('to address',"from address")
success,msg= @f.check_mx

email-authentication's People

Contributors

semdinsp avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.