Created
May 23, 2016 11:22
-
-
Save nkcr/db2bd5fa3a017d5e7351ab2535d45354 to your computer and use it in GitHub Desktop.
Manually inline css using premailer-rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Inside a controller | |
mail = Premailer::Rails::Hook.new(NewsMailer.news(@newsletter, params[:email])) | |
mail.perform | |
mail.message.html_part.body.decoded # Gives plain inlined HTML |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment