# Mailstro Client for Ruby TODO: Write a gem description ## Installation 1. Add the `mailstro` gem to your `Gemfile` ```ruby gem "mailstro" ``` 2. Install the gem ```shell bundle install ``` 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 ``` ## Usage To send a 'welcome' email use the following: ```ruby Mailstro.deliver(:welcome, "shanon@mailstroapp.com", :greeting => "Hi") ``` To send a 'thank_you' email to a list of 'customers' use the following: ```ruby Mailstro.list_subscribe(:customers, 'jack@mailstroapp.com') Mailstro.list_subscribe(:customers, 'fred@mailstroapp.com') Mailstro.list_unsubscribe(:customers, 'jack@mailstroapp.com') Mailstro.list_deliver(:customers, :welcome, :greeting => "Hi") ``` ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request