Skip to content

Commit

Permalink
Bump version number to 0.4.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
temochka committed May 10, 2013
1 parent 6bbe01d commit 943dd6f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
40 changes: 21 additions & 19 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ The Postmark Rails Gem is a drop-in plug-in for ActionMailer to send emails via
* lower than 2.3: could work, but not tested
* 2.3 and higher
* 3.0
* 4.0

== Install

sudo gem install postmark-rails

== Requirements

* "postmark" gem version 0.8 and higher is required.
* "postmark" gem version 0.9 and higher is required.
* You will also need a Postmark account, server and sender signature set up to use it. To get an account, sign up at http://postmarkapp.com.

== Configuring your Rails application
Expand All @@ -25,31 +26,31 @@ The Postmark Rails Gem is a drop-in plug-in for ActionMailer to send emails via

Add this to your Gemfile: (change version numbers if needed)

gem 'postmark-rails', '0.4.1'
gem 'postmark-rails', '0.4.2'

Don't forget to run "bundle install" command every time you change something in the Gemfile.

Add this to your config/application.rb:

config.action_mailer.delivery_method = :postmark
config.action_mailer.postmark_settings = { :api_key => "your-api-key" }

=== Rails 2

Add this to config/environment.rb:

Rails::Initializer.run do |config|

...

config.gem 'postmark-rails'
require 'postmark-rails'

config.action_mailer.postmark_api_key = "your-api-key"
config.action_mailer.delivery_method = :postmark

...

end

For API details, refer to the developer documentation at http://developer.postmarkapp.com.
Expand All @@ -61,7 +62,7 @@ You can use a tag to categorize outgoing messages and attach application-specifi
=== Rails 3

class TestMailer < ActionMailer::Base

def tagged_message
mail(
:subject => 'hello',
Expand All @@ -70,20 +71,20 @@ You can use a tag to categorize outgoing messages and attach application-specifi
:tag => 'my-tag'
)
end

end

=== Rails 2

class SuperMailer < ActionMailer::Base

def email
from "no-reply@example.com"
subject "Some marvelous email message"
recipients "someone-fancy@example.com"
tag "my-another-tag"
end

end

== Sending attachments
Expand All @@ -97,7 +98,7 @@ The legacy #postmark_attachments method is no longer supported on Rails 3.2.13 a
=== Rails 3

class TestMailer < ActionMailer::Base

def message_with_attachment
attachment['42.jpg'] = File.read("/path/to/file")
mail(
Expand All @@ -106,22 +107,22 @@ The legacy #postmark_attachments method is no longer supported on Rails 3.2.13 a
:from => 'leonard@bigbangtheory.com'
)
end

end

=== Rails 2

class SuperMailer < ActionMailer::Base

def email
from "no-reply@example.com"
subject "Some marvelous email message"
recipients "someone-fancy@example.com"
postmark_attachments [File.open("/path/to/file")]
end

end

You can pass either an array of File objects or a single object. Postmark will detect the file name automatically and send an attachment with the "application/octet-stream" content type. If you want more control on how attachments get formatted, you can pass Hash objects, which contain the custom settings such as file name or content-type. Here is an example:

#
Expand All @@ -144,6 +145,7 @@ You can pass either an array of File objects or a single object. Postmark will d

== Authors & Contributors

* Artem Chistyakov
* Petyo Ivanov
* Ilya Sabanin
* Hristo Deshev
Expand Down
2 changes: 1 addition & 1 deletion lib/postmark-rails/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Postmark
module Rails
VERSION = '0.4.1'
VERSION = '0.4.2'
end
end

0 comments on commit 943dd6f

Please sign in to comment.