TODO: Write a gem description
Add this line to your application's Gemfile:
gem 'nifty-email'
And then execute:
$ bundle
Or install it yourself as:
$ gem install nifty-email
NiftyEmail.api_token = '4U2+OKuABdopirrzp/zDdA=='
email = NiftyEmail.get_email('awesome-email', full_name: 'Jim Tom')
puts email.html
puts email.text
# initializer
NiftyEmail.api_token = '4U2+OKuABdopirrzp/zDdA=='
# mailer
email = NiftyEmail.get_email('awesome-email', full_name: 'Jim Tom')
mail(
to: 'jimtom@example.com',
subject: 'Welcome!',
body: email.html,
content_type: 'text/html'
)
# or with HTML and text parts
mail(to: 'jimtom@example.com', subject: 'Welcome!') do |format|
format.html { email.html }
format.text { email.text }
end
- Fork it ( https://github.com/[my-github-username]/nifty-email/fork )
- 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 a new Pull Request