Mailgat
Client wrapper for Mailgun API
Installation
Add this line to your application's Gemfile:
gem 'mailgat'
And then execute:
$ bundle
Usage
Simply configure with your API key:
# config/initializers/mailgun.rb
Mailgat.configure do |config|
config.api_key = "XYZ"
config.public_key = "ABC" # optional
config.adapter = :typoeus # optional; will default to your Faraday default adapter
end
The client will also try to use ENV["MAILGUN_API_KEY"] by default.
Email Validation
Wraps validation endpoint. Example usage:
email = Mailgunner::Email.new("jason@;gmail.com")
email.valid? # => false
email.suggestion # => "[email protected]"
Testing
To run the tests:
$ rake spec
Contributing
Pull Requests more than welcome!
- Fork it ( https://github.com/jamesdphillips/mailgunner/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
