Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tmeasday/premailer-rails
A plugin to hook premailer into ActionMailer
https://github.com/tmeasday/premailer-rails
Last synced: 2 months ago
JSON representation
A plugin to hook premailer into ActionMailer
- Host: GitHub
- URL: https://github.com/tmeasday/premailer-rails
- Owner: tmeasday
- License: mit
- Created: 2010-02-11T22:28:04.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2010-02-11T22:45:20.000Z (almost 15 years ago)
- Last Synced: 2024-10-04T18:50:06.995Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 276 KB
- Stars: 7
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: MIT-LICENSE
Awesome Lists containing this project
README
premailer-rails
=========This plugin allows you to write HTML emails properly (i.e. using proper CSS) and uses Alex Dunae's premailer to convert the emails to inlined HTML suitable for all major email clients.
Example
=======in RAILS_ROOT/app/models/notifications.rb:
def some_mail(args)
subject args.delete(:subject)
recipients args.delete(:recipient)
from args.delete(:from)
sent_on Time.now
body args
premail
endThis mail can now be written a standard HTML document using CSS linked in, using partials etc (as in any other view on your site). It should be at app/views/notifications/some_mail.text.html.erb.
Premailer will then prepare an inlined version of the view whenever a email is sent.
Copyright (c) 2009 Tom Coleman, released under the MIT license
Using code from the premailer project by Alex Dunae (http://code.dunae.ca/premailer.web/).