Giter Club home page Giter Club logo

mailcheck-java's Introduction

mailcheck-java

Introduction

I noticed there was a useful project by Derrick Ko of Kicksend at https://github.com/Kicksend/mailcheck, and thought it would be useful for GWT projects or for JSF projects to have java code to accomplish the same thing. It looks like through empirical testing the use of mailcheck has increased the quality of their data.

So all I've done is a simple port from Javascript to Java, leaving out the jquery integration. I've moved stuff around to fit the style of Java and my own style, and put in JUnit tests that should (at time of writing) cover the same scenarios as are tested for in the Kicksend version of mailcheck.

There's no reason why JSR 303 or Spring validation couldn't be added to this project to lessen the need for glue code, but I haven't put this in yet because an email address that has a suggestion isn't 'invalid' necessarily.

Installation

I haven't put this in any maven repositories, so your best bet is to grab the code and install the project in your maven repository.

You can then add it your project (assuming you use Maven) by referring to it using the maven coordinates:

<dependency>
    <groupId>com.intercognition</groupId>
    <artifactId>mailcheck-java</artifactId>
    <version>0.1</version>
</dependency>

Usage

I've created it so that it can be easily used programmatically or configured by an IOC container like Spring. You can get up and running quickly by doing the following:

MailCheck mailCheck = new MailCheck(new DefaultConfiguration());
EmailAddress address = mailCheck.suggest("[email protected]");

This will return you an EmailAddress object giving you a suggestion. If a suggestion could not be found, a null EmailAddress will be returned.

Author

Konrad Bloor ([email protected])

Contributors

Quenio dos Santos (https://github.com/quenio)

License

Copyright (c) 2012 Konrad Bloor

Licensed under the MIT License.

mailcheck-java's People

Contributors

konradbloor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mailcheck-java's Issues

Small discrepancy in Java implementation of the the Sift3 algorithm

Hello,

One of my work teammates has noticed the following example was not matching in our web site:

The mobile app was picking up “x.c” as close to “me.com”, while the web site was not.

After some investigation, I noticed that was due to a subtle discrepancy between the Java and the JavaScript implementation of the Sift3 string distance algorithm. The Java implementation was rounding the calculation of the average string length while the JavaScript one was not.

I am attaching the patch I've made to this issue for your review.

Thanks,

  • Quenio

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.