Trumail

Gem Version Build Status

API wrapper for the free and open source Trumail email validation/verification system. You can also self-host the system on your own server. Find out more here: https://github.com/sdwolfe32/trumail

Installation

Add this line to your application's Gemfile:

gem 'trumail'

And then execute:

$ bundle

Or install it yourself as:

$ gem install trumail

Usage

# Basic Lookup
lookup = Trumail::Lookup.new('[email protected]').verify
lookup = Trumail::Lookup.verify('[email protected]')

# Custom Host
lookup = Trumail::Lookup.new('[email protected]', host: 'https://verifier.com').verify
lookup = Trumail::Lookup.verify('[email protected]', host: 'https://verifier.com')

# Custom Format
lookup = Trumail::Lookup.new('[email protected]', format: :xml).verify
lookup = Trumail::Lookup.verify('[email protected]', format: :xml)

# Public Methods
lookup.url          => 'https://trumail.io/json/[email protected]'
lookup.to_h         => { 'address' => '[email protected]', 'catchAll' => true, ... }
lookup.address      => '[email protected]'
lookup.username     => 'test'
lookup.domain       => 'email.com'
lookup.catch_all?   => true
lookup.deliverable? => false
lookup.disposable?  => true
lookup.full_inbox?  => false
lookup.gravatar?    => true
lookup.host_exists? => false

Contributing

Your contribution is welcome.

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