Jump to content

Convert HTML page for email by moving all styles to element style attribute


Henrik

Recommended Posts

All,

I want to be able to send any web page out through an email, but most email clients, particularly webmail clients, are happier if all style information is found in local element style attributes.

How do I create (or find) a PHP routine that takes an email page (with css file references) as input, and generates html with all style elements shoved down to the style attribute of each element, as output?

I think another way of putting this is:

Is there a PHP (or PEAR) equivalent to the Javascript currentStyle/getComputedStyle functions, such that I can walk through an HTML page DOM, compute the style for each element, and jam that style into that element's style attribute?

Thanks,

- Henrik

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.