The most robust html emails have no CSS, not even inline.

Instead, they have lots of tags and similar.

It could be quite helpful to have some automatic filtering to generate this ugly markup, as an alternative to the CSS inliner shipped with Mimemail.
One thing I could imagine would be to move font tags down the DOM hierarchy:

<font size="1">
  <table><tr><td>
    some text
  </td><td>
    more text
  </td></tr></table>
</font>

becomes

<table><tr><td>
  <font size="1">some text</font>
</td><td>
  <font size="1">more text</font>
</td></tr></table>

One could also think about turning all CSS into HTML, but I guess this is better done manually. In any case, it is important to give the user (or in case of mimemail, other modules) full control of what happens to the markup.

Thx a lot,
donquixote

Comments

sgabe’s picture

Is there any framework we could use for this? I guess you didn't thought about Tidy, did you? However I think that it wouldn't be a bad idea to implement Tidy support to clean up the message source.

Update: Or see the HTML fixer, which fixes bad nesting and merges different styles attributes in the same tag etc.

donquixote’s picture

The most robust html emails have no CSS, not even inline.

Instead, they have lots of tags and similar.

I changed my mind about this. Some inline CSS is totally ok, you just need to know which CSS rules work and which don't (in some email clients).
So, I guess this can be marked as a wontfix (but not by me).

sgabe’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Active » Closed (won't fix)

Okay, thanks for your response. Then I am closing this. However I will think about the HTML clean up support, that would be nice.