MailStyle plugin

Plugin details

Making HTML emails a little less painful. Writes css inline and corrects image urls.

Websitehttp://blog.purifyapp.com/2009/12/30/mailstyle-a-html-email-plugin-for-ruby-on-rails/ Repositorygit://github.com/purify/mail_style.git Tags mail LicenseUnknown

Documentation

Install the plugin:
ruby script/plugin install git://github.com/purify/mail_style.git

Simply add the css method to your deliver actions:

class Notifier < ActionMailer::Base
  def welcome_email
    css :email
    
    subject 'Welcome Aboard'
    recipients 'someone@example.com'
    from 'jimneath@googlemail.com'
    sent_on Time.now
  end
end



This will look for a css file called email.css in your public/stylesheets folder. The css method can take either a string or a symbol. You can also pass the css file name with or without the .css extension.

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: Guest, 7 months ago