README.md in mailtrap-1.0.1 vs README.md in mailtrap-1.1.0

- old
+ new

@@ -85,9 +85,30 @@ client = Mailtrap::Sending::Client.new(api_key: 'your-api-key') client.send(mail) ``` +### ActionMailer + +This gem also adds ActionMailer delivery method. To configure it, add following to your ActionMailer configuration (in Rails projects located in `config/$ENVIRONMENT.rb`): +```ruby +config.action_mailer.delivery_method = :mailtrap +config.action_mailer.mailtrap_settings = { + api_key: ENV.fetch('MAILTRAP_API_KEY') +} +``` +And continue to use ActionMailer as usual. + +To add `category` and `custom_variables`, add them to the mail generation: +```ruby +mail( + to: 'your@email.com', + subject: 'You are awesome!', + category: 'Test category', + custom_variables: { test_variable: 'abc' } +) +``` + ## 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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).