How to get CSS to E-Mails back in Magento 1.9.1

2.3k Views Asked by At

Since the upgrade from 1.9.0.1 to 1.9.1 my E-Mails are no longer styled. The CSS I entered in the template_styles Field ("Vorlagenstile") is no longer loaded.

I read about the new Feature here http://www.magentocommerce.com/knowledge-base/entry/ee1141-ce191-responsive-email#email-css but i can't get this thing to load any CSS.

In addition the Preview lacks the standard <html>, <body>, ... etc. prefix. (I don't know if this was the case before the upgrade).

Any Ideas?

2

There are 2 best solutions below

2
On BEST ANSWER

Ok I overread something. You have to add

{{var non_inline_styles}}

to your E-Mail "Template Content" field.

Looks like this then:

{{var non_inline_styles}}
{{block type='core/template' area='frontend' template='email/header-billing.phtml'}}
        <table cellspacing="0" cellpadding="0" border="0" width="650">
            <tr>
                <td valign="top">
                    <p>
                        <strong>Hallo {{htmlescape var=$order.getCustomerName()}}</strong>,<br/>
                       ...

So now I have to do this to all the 37 E-Mail Templates. Thanks Magento!!

1
On

if your are a C#.net/VB.net programmer I suggest you to use PreMailer.Net.

C# Library for moving CSS to inline style attributes, to gain maximum E-mail client compatibility.

It converts make html style tags into element inline styles.