GitXplorerGitXplorer
s

nifty-email-ruby

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
fff60ef4173ff9c00e5d446236409ac7dad0c85c

Require Faraday and bump to version 0.0.6

ssalbertson committed 10 years ago
Unverified
7cd23a401ea8a6efb87017f02ea28d4afa8fc019

Change reference to token to api_token

ssalbertson committed 11 years ago
Unverified
e40b2d4312ac35047c1b5ffe397e50e717d04e55

Raise if email cannot be found

ssalbertson committed 11 years ago
Unverified
905caca983f5802372d204fd055c23350ed70c5c

Bump version to 0.0.4

ssalbertson committed 11 years ago
Unverified
9e9c0a7cd92f52e89294bb5317cd792f5ae27dda

Update README with another Rails example

ssalbertson committed 11 years ago
Unverified
30e3d462f56c21ee0a15263de805111bc339cd69

Bump version 0.0.3

ssalbertson committed 11 years ago

README

The README file for this repository.

Nifty::Email

TODO: Write a gem description

Installation

Add this line to your application's Gemfile:

gem 'nifty-email'

And then execute:

$ bundle

Or install it yourself as:

$ gem install nifty-email

Usage

General example

NiftyEmail.api_token = '4U2+OKuABdopirrzp/zDdA=='

email = NiftyEmail.get_email('awesome-email', full_name: 'Jim Tom')
puts email.html
puts email.text

Rails example

# 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

Contributing

  1. Fork it ( https://github.com/[my-github-username]/nifty-email/fork )
  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 a new Pull Request