bsedat/mandrill-mailer-rails — pull request #1 by spovich (2014-11-15 09:17:11+00:00)
Title: Capture and expose Mandrill return value

Hi, I see this is not a published gem, but the code is clear, you have travis hooked up, and good tests (which is better than what I found in mandrill_dm) :) What are you intentions with this repo? Do you plan to publish this gem?

If you are interested, this PR adds an attribute to capture the resulting json from the api call which is useful for a variety of scenarios.

In my case, after sending the email, this allows me to look at the `Mail::Message#delivery_method` and see the `result` (and `settings` if you are interested). The `mail#delivery_method` is an instance of MandrillActionMailer. Specific changes:

* Add `result` attr_accessor on MandrillActionMailer
* Populate `result` with the return json from mandrill which includes id, status, reject_reason, etc.
* Rename integration test to match handler name
* Set values for track_opens and track_clicks in env and add test to ensure those are set in mailer.