Readme.md in mailstro-0.0.10 vs Readme.md in mailstro-0.1.0

- old
+ new

@@ -1,8 +1,8 @@ # Mailstro Client for Ruby -TODO: Write a gem description +A quick and easy way to send emails from your ruby application. ## Installation 1. Add the `mailstro` gem to your `Gemfile` @@ -19,23 +19,33 @@ 3. Configure the mailstro module with your API key. In rails apps, put this code to a new file at `config/initializers/mailstro.rb` ```ruby - require 'mailstro' - Mailstro.configure do |config| config.api_key = "YOUR_API_KEY_HERE" end ``` + By default, mailstro operates in test mode. This ensures accidental emails are not sent + in development or staging environments. + + In rails apps, put this code to a new file at `config/environments/production.rb` + + ```ruby + # Enable production mode, and start sending real emails. + Mailstro.configure do |config| + config.enabled = true + end + ``` + ## Usage Sending a basic email. ```ruby -Mailstro.deliver(:welcome +Mailstro.deliver(:welcome, :to => 'shanon@mailstroapp.com', :data => { :coupon_code => 'THANKS01' } ) @@ -50,10 +60,10 @@ ``` Verify emails are being sent with simple matchers. ```ruby -Mailstro.deliver(:welcome +Mailstro.deliver(:welcome, :to => 'shanon@mailstroapp.com' ) Mailstro.should have_delivered(:welcome, :to => 'shanon@mailstroapp.com'