README.md in tuktuk-0.6.1 vs README.md in tuktuk-0.6.2

- old
+ new

@@ -38,20 +38,20 @@ } response, email = Tuktuk.deliver(message) ``` -The `response` is either a Net::SMTP::Response object, or a Bounce exception (HardBounce or SoftBounce, depending on the cause). `email` is a [mail](https://github.com/mikel/mail) object. So, to handle bounces you'd do: +The `response` is either a [Net::SMTP::Response](http://ruby-doc.org/stdlib-2.0.0/libdoc/net/smtp/rdoc/Net/SMTP/Response.html) object, or a Bounce exception (HardBounce or SoftBounce, depending on the cause). `email` is a [mail](https://github.com/mikel/mail) object. So, to handle bounces you'd do: ``` ruby [...] response, email = Tuktuk.deliver(message) if response.is_a?(Tuktuk::Bounce) puts 'Email bounced. Type: ' + response.class.name # => HardBounce or SoftBounce else - puts 'Email delivered!' + puts 'Email delivered! Server responded: ' + response.message end ``` You can also call `Tuktuk.deliver!` (with a trailing `!`), in which case it will automatically raise an exception if the response was either a `HardBounce` or a `SoftBounce`. This is useful when running in the background via Resque or Sidekiq, because it makes you aware of which emails are not getting through, and you can requeue those jobs to have them redelivered.