Planet Express.rb
Description
Planet Express, Inc. is an intergalactic email delivery company
lib built in Ruby. Is meant to be used with Silverpop mailing system, to provide
an easy way to send emails. We're using it with Rails 3 apps.
"Our crew is replaceable. Your
packageemail isn't."
Features
- Send emails using Silverpop.
Examples
You only need three things, the package, the destination and the data. Then create a new deliver, prepare the ship and deliver it!
require 'planet_express'
recipient = 'email@test.com'
package_id = 432524234
cargo = { html_body_text: "<h1>Good news everyone!</h1><img src='http://goo.gl/XazeH'>" }
job = PlanetExpress::Delivery.new
request = job.prepare package_id, recipient, cargo
response = job.deliver!
Configuration
job.configure do |config|
config.gateway_url = 'https://transact3.silverpop.com/XTMail'
end
Installation
Add this line to your application's Gemfile gem 'planet_express'
and then
execute bundle install
. Or install it yourself as: gem install planet_express
.
Silverpop API
Check this file: doc/silverpop_api.md
Build
do changes and update version.rb and CHANGELOG.
git commit & push
rake build; rake release;
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Build
- Do changes.
- Increase the
version.rb
using http://semver.org/ pattern. - Run specs
- Commit changes
- Release to RubyGems.org with
rake release
- Fun
@MarioZaizar