19

I was wondering, if there is software out there that can convert an (web html css) to (e-mail html inline css) file, in order to be viewable from most e-mail clients like outlook, Thunderbird or webmails like gmail,yahoo,hotmail etc.

I would like to be able to write my code as I do writing xhtml files and then import that file to the program and convert divs to tables and css to inline styles compatible for e-mail clients.

Any suggestions?

themhz
  • 8,335
  • 21
  • 84
  • 109

3 Answers3

11

I use a service by Mailchimp named CSS inliner. Its really a nice tool you have to just keep your html & CSS in the same file(no external css file). I mean to say keep all CSS in your html file inside tag in the . See below:

<head>    
  <style type="text/css">
      /*Your CSS goes Here*/
  </style>
</head>

Here is the link: https://templates.mailchimp.com/resources/inline-css

Zandor Smith
  • 558
  • 6
  • 25
SVS
  • 4,245
  • 1
  • 23
  • 28
  • This service is *awesome*. It does a stupendous job at inlining css, and many cases where I thought the css was to complex, it handling fine. Note that this is well named as "Mailchimp named CSS inliner," NOT: "Mailchimp CSS to Email Converter," because it does one thing only: Convert styles to inline. So one thing you'll still have to do for instance is add width and height attributes to img elements (hideous, isn't it). – Nicholas Petersen Jun 06 '13 at 19:47
  • "Unable to connect" – Peter Krauss May 12 '20 at 13:49
  • 1
    updated url https://templates.mailchimp.com/resources/inline-css/ – Krazibit312 Jul 15 '21 at 09:23
5

Unfortunately I know of no software that will directly do this. There are features that can be represented in divs that cannot be in tables. Furthermore, it is not trivial to send the actual HTML.

email html is somewhat of a dark art as it requires layout techniques that were deprecated (tables for layout) and manually testing on relevant platforms (Yahoo, Google, Thunderbird, Outlook).

Mikhail
  • 7,749
  • 11
  • 62
  • 136
  • 1
    I found this slideshow that gives some simple patterns though, http://www.slideshare.net/OwlHillMedia/how-to-code-html-email-newsletters I understand that there are restrictions that actually disables any skilled web developer in this area, many programs with different reading styles, but how come those programs are not w3c compatible like most browsers? I mean how hard is it for an e-mail client to read html content like a browser does?. – themhz Mar 18 '12 at 19:34
  • It is perhaps unsafe as one maybe able to write some code that will extract information in the DOM (that contains other e-mails) and relay that information. I suspect the secret reason is stylistic integrity and data-capacity. Lastly, because no client will do this there is no motivation to change. I am pretty sure Thunderbird has the guts to render full HTML. Nobody wants to receive fancy spam. – Mikhail Mar 18 '12 at 19:38
  • 1
    I also found this tool http://inlinestyler.torchboxapps.com/ But I am not sure that it will work in most cases. I will test it anyway – themhz Mar 18 '12 at 19:45
  • since you are the only one that actually answered and since you are right i will consider your answer correct. Thank you very much. – themhz Mar 18 '12 at 20:33
-1

You may try this service http://email.bigutility.com/inline-css-convert. It convert any content from url to inline css.

Some key features:

  • Support page that has multi external css file.

  • Support CDN (css file that load from CDN server).

  • Support jQuery selector to filter result.

  • HTML Editor (wysiwyg) to edit your inline css page.
Howto
  • 15
  • 3