Sha256: ce8858deaac77b55b5c791fb098c5d4152d710fe1a4c890f3f9da2266b7ba09e
Contents?: true
Size: 1.29 KB
Versions: 6
Compression:
Stored size: 1.29 KB
Contents
# Rails 2.x These notes describe behavior specific to the Rails 2.x environment. Unless otherwise specified the approach in the main documentation applies. ## Installation In `config/environment.rb` add the following: config.gem 'postageapp' Then from the Rails project's root run: rake gems:install rake gems:unpack GEM=postageapp script/generate postageapp --api-key PROJECT_API_KEY ## Mailer Creation Here's an example of a mailer you'd set in in a Rails 2 environment: ```ruby require 'postageapp/mailer' class Notifier < PostageApp::Mailer def signup_notification from 'system@example.com' subject 'New Account Information' # Recipients can be in any format API allows. # Here's an example of a hash format recipients( 'recipient_1@example.com' => { 'variable_name_1' => 'value', 'variable_name_2' => 'value' }, 'recipient_2@example.com' => { 'variable_name_1' => 'value', 'variable_name_2' => 'value' }, ) attachment( :content_type => 'application/zip', :filename => 'example.zip', :body => File.read('/path/to/example.zip' ) # PostageApp specific elements: postageapp_template 'example_template' postageapp_variables 'global_variable' => 'value' end end ```
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
postageapp-1.4.2 | doc/RAILS2.md |
postageapp-1.4.1 | doc/RAILS2.md |
postageapp-1.4.0 | doc/RAILS2.md |
postageapp-1.3.1 | doc/RAILS2.md |
postageapp-1.3.0 | doc/RAILS2.md |
postageapp-1.2.6 | doc/RAILS2.md |