Skip to content
Library for RFC822 compatible email validation and MX record checks
Find file
Latest commit d69cffa Dec 8, 2015 @dim Bumped version
Failed to load latest commit information.
lib Ensure domains end with an atom. Bumped deps Dec 8, 2015
.gitignore Added Gemfile.lock to .gitignore. Jan 11, 2014
.travis.yml Added ree into failure matrix. Jan 11, 2014
Gemfile Fixed issue with rbx platform in gemfile. Jan 11, 2014
LICENSE Initial release Nov 11, 2009
README.textile Updated readme to reflect compatability. Jan 11, 2014
Rakefile Updated gemspec, bumped version (thanks to `anthonator`) Jan 12, 2014
init.rb Initial release Nov 11, 2009
rfc-822.gemspec Bumped version Dec 8, 2015



RFC822 compatible email validation and MX record check.


  • Ruby 1.9, 2.0 & 2.1 compatible
  • MRI, JRuby and Rubinius compatible
  • Email validation
  • MX checks (requires ‘host’ command line application)


Download from GitHub
As a GEM
gem install rfc-822
Clone from GitHub
git clone git://
As a Rails plugin
ruby script/plugin install git://

Usage Examples

validates_format_of :email, :with => RFC822::EMAIL
"" =~ RFC822::EMAIL ? puts("Email is valid.") : puts("Email is invalid")
RFC822.mx_records('') # => [#<struct RFC822::MXRecord priority=15, host="">]


Please see LICENSE document


  • Inspired by previous work of Cal Henderson, Tim Fletcher and Dan Kubb.
Something went wrong with that request. Please try again.