by gfodor · 12y ago · 0 comments
Glad this made it into Rails itself.
And if you've ever wanted to put inline CSS into emails, roadie will help with that: https://github.com/Mange/roadie
Or, you could easily just create controller actions which render your emails as well:
@body = mail.body.parts[1].html_part.body.raw_source
render '/mailer_notification/preview.html', :layout => false
And in preview.html.erb: <%= raw(@body) %>