README.md in mail-notify-0.1.0 vs README.md in mail-notify-0.2.0
- old
+ new
@@ -1,6 +1,6 @@
-[![CircleCI Status](https://img.shields.io/circleci/project/github/pezholio/mail-notify.svg?style=flat-square)](https://circleci.com/gh/pezholio/mail-notify)
+[![CircleCI Status](https://img.shields.io/circleci/build/gh/dxw/mail-notify.svg?style=flat-square)](https://circleci.com/gh/dxw/mail-notify)
[![Coverage Status](https://img.shields.io/coveralls/github/pezholio/mail-notify.svg?style=flat-square)](https://coveralls.io/github/pezholio/mail-notify)
[![Gem Version](http://img.shields.io/gem/v/mail-notify.svg?style=flat-square)](https://rubygems.org/gems/mail-notify)
[![License](http://img.shields.io/:license-mit-blue.svg)](https://mit-license.org/)
# Mail::Notify
@@ -52,11 +52,11 @@
Next, in your mailer you'll need to call `view_mail` with the first parameter being the ID of the notify template, followed by a hash of email headers e.g:
```ruby
class MyMailer < Mail::Notify::Mailer
def send_email
- notify_mail('YOUR_TEMPLATE_ID_GOES_HERE',
+ view_mail('YOUR_TEMPLATE_ID_GOES_HERE',
to: 'mail@somewhere.com',
subject: 'Subject line goes here'
)
end
end
@@ -74,9 +74,31 @@
template_mail('YOUR_TEMPLATE_ID_GOES_HERE',
to: 'mail@somewhere.com',
personalisations: {
foo: 'bar'
}
+ )
+ end
+end
+```
+
+#### With optional Notify arguments
+
+It's possible to pass two optional arguments to Notify:
+
+- `reply_to_id`: This is an email reply-to address specified by you to receive replies from your users
+- `reference`: A unique identifier you can create if necessary. This reference identifies a single unique notification or a batch of notifications
+
+More information can be [found in the docs](https://docs.notifications.service.gov.uk/ruby.html#send-an-email-arguments-personalisation-optional)
+
+```ruby
+class MyMailer < Mail::Notify::Mailer
+ def send_email
+ view_mail('YOUR_TEMPLATE_ID_GOES_HERE',
+ to: 'mail@somewhere.com',
+ subject: 'Subject line goes here',
+ reply_to_id: 'YOUR_REPLY_TO_ID_GOES_HERE',
+ reference: 'ABC123XYZ'
)
end
end
```