README.md in postmark-rails-0.16.0 vs README.md in postmark-rails-0.17.0

- old
+ new

@@ -12,14 +12,14 @@ For Rails 2.3 please take a look at [version 0.4](https://github.com/wildbit/postmark-rails/tree/v0.4.2). It may miss some new features, but receives all required bug fixes and other support if needed. ## Configuring your Rails application -Add `postmark-rails` to your Gemfile (change version numbers if needed) and run `bundle install`. +Add `postmark-rails` to your Gemfile and run `bundle install`. ``` ruby -gem 'postmark-rails', '~> 0.15.0' +gem 'postmark-rails' ``` Save your Postmark API token to [config/secrets.yml](http://guides.rubyonrails.org/4_1_release_notes.html#config-secrets-yml). ``` yaml @@ -71,9 +71,28 @@ def message_with_attachment attachments.inline['logo.png'] = File.read("/path/to/image") # Inline image attachments['42.jpg'] = File.read("/path/to/file") # Attached file mail( :subject => 'hello', + :to => 'sheldon@bigbangtheory.com', + :from => 'leonard@bigbangtheory.com' + ) + end + +end +``` + +## Attaching metadata to messages + +Postmark supports [attaching metadata to messages](https://postmarkapp.com/support/article/1125-custom-metadata-faq-1). All metadata field values will be interpreted and returned in webhook payloads as strings. + +``` ruby +class TestMailer < ActionMailer::Base + + def message_with_metadata + metadata['foo'] = 'bar' + mail( + :subject => 'meta hello', :to => 'sheldon@bigbangtheory.com', :from => 'leonard@bigbangtheory.com' ) end