Project

mailcheck

0.02
No commit activity in last 3 years
No release in over 3 years
A ruby translation of the Kicksend mailcheck javascript library (https://github.com/Kicksend/mailcheck) which suggests a right domain when your users misspell it in an email address.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 2.12
 Project Readme

mailcheck-ruby

The Ruby library that suggests a right domain when your users misspell it in an email address. See the original at https://github.com/mailcheck/mailcheck.

When your user types in "user@hotnail.con", Mailcheck will suggest "user@hotmail.com".

Mailcheck will offer up suggestions for top level domains too, and suggest ".com" when a user types in "user@hotmail.cmo".

mailcheck-ruby is part of the Mailcheck family, and we're always on the lookout for more ports and adaptions. Get in touch!

Installation

Add this line to your application's Gemfile:

gem 'mailcheck'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mailcheck

Usage

> require 'mailcheck'

> mailcheck = Mailcheck.new
> mailcheck.suggest("user@hotma.com")
# => {
#   :address =>"user",
#   :domain  =>"hotmail.com",
#   :full    =>"user@hotmail.com"
# }

Returns false if no suggestion:

> mailcheck.suggest("user@hotmail.com")
# => false

Pass in a custom list of domains and TLDs:

mailcheck = Mailcheck.new(
  :domains => ["gmail.com", "hotmail.com", "aol.com"],
  :top_level_domains => ["com", "net", "org"]
)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Credits

Maintainers

License

Licensed under the MIT License.