https://github.com/drexed/trumail
Trumail Ruby SDK.
https://github.com/drexed/trumail
email ruby trumail verification
Last synced: 7 months ago
JSON representation
Trumail Ruby SDK.
- Host: GitHub
- URL: https://github.com/drexed/trumail
- Owner: drexed
- Created: 2017-10-18T20:13:54.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-08-01T23:29:26.000Z (over 1 year ago)
- Last Synced: 2025-09-06T23:51:41.505Z (8 months ago)
- Topics: email, ruby, trumail, verification
- Language: Ruby
- Homepage: https://drexed.github.io/trumail
- Size: 46.9 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Trumail
[](http://badge.fury.io/rb/trumail)
[](https://travis-ci.org/drexed/trumail)
API wrapper for the free and open source [Trumail](https://trumail.io) email validation/verification system.
You can also self-host the system on your own server. Find out more here: [https://github.com/sdwolfe32/trumail](https://github.com/sdwolfe32/trumail)
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'trumail'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install trumail
## Usage
### Lookup
```ruby
# Basic Lookup
lookup = Trumail::Lookup.new('test@email.com').verify
lookup = Trumail::Lookup.verify('test@email.com')
# Custom Host
lookup = Trumail::Lookup.verify(
'test@email.com',
host: 'https://verifier.com',
format: :xml
)
```
### Response
```ruby
lookup.url => 'https://api.trumail.io/v2/lookup/json?email=test@email.com'
lookup.hash => { 'address' => 'test@email.com', 'catchAll' => true, ... }
lookup.success? => true
lookup.error? => false
# Data Methods
lookup.address => 'test@email.com'
lookup.username => 'test'
lookup.domain => 'email.com'
lookup.md5_hash => '0065537cb732045561c0d23e859710f4'
lookup.suggestion => nil
lookup.catch_all? => true
lookup.deliverable? => false
lookup.disposable? => true
lookup.free? => true
lookup.full_inbox? => false
lookup.gravatar? => true
lookup.host_exists? => false
lookup.role? => false
lookup.valid_format? => true
```
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/trumail. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
## Code of Conduct
Everyone interacting in the Trumail project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/trumail/blob/master/CODE_OF_CONDUCT.md).