3

I'm not really sure how to approach this problem. I'm generating emails via lithium and would like to inline the css styles after the view/template has fully rendered before it's displayed in the browser.

It's very simple when building the view manually, using the Emogrifier package:

$view = new lithium\template\View(array('paths' => $paths));
$raw = $view->render('all', $data, $render);
$inliner = new Pelago\Emogrifier($raw);
$inline = $inliner->emogrify();

I already have a custom Media::type() to render the email templates (using the Inky template language).

Eric C
  • 971
  • 6
  • 14

0 Answers0