0.02
No commit activity in last 3 years
No release in over 3 years
Auto email plain text part generator
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Plain David

Plain David automatically generates a text part for your HTML emails.

Install

Add the gem to Rails' Gemfile

gem 'plain-david'

Usage

Nothing. Just send emails as normal, and a text part will be automatically generated. The email will be changed from HTML to multipart like magic!

It works seamlessly with css inliners like Roadie.

Works with Rails 3, 4 and 5.

Conversion Strategies

You can set your own conversion strategy. The default MarkdownStrategy converts the HTML to Markdown. If you want to use your own you just need to set the strategy option.

For example, in your application.rb:

class AwesomeStrategy
  attr_accessor :html

  def initialize(html)
    @html = html
  end

  def convert!
    @html.awesomize!
  end
end

config.plain_david.strategy = AwesomeStrategy

Contributing

  • Fork the project.
  • Make your feature addition or bug fix.
  • Send me a pull request. Bonus points for topic branches.

License

MIT License. See LICENSE for details.

Copyright

Copyright (c) 2013-2016 Luca Spiller.