I want to edit some css for the transaction emails in Magento 1.5.

When I edit it directly in the backend, it's not getting applied in webbased clients like Gmail. I tried looking for /skin/frontend/base/default/css/email-inline.css but it seems like there is no such file in Magento 1.5.
I did find a file /html/var/email/styles/, but again, when I change css in it, it is not getting applied in Gmail. The only thing that works is if I apply the CSS directly inline in the content, such as

<td class="content" valign="top">
<h1 style="font-size:14px";>... {{htmlescape var=$order.getBillingAddress().getName()}},</h1>
<p>... {{block type='imprint/field' value='shop_name'}}. ...</p>
<h2>... {{var order.increment_id}} ... {{var order.getCreatedAtFormated('long')}} ...</h2>

Does anyone know how to edit the CSS for all email clients?
Thank you!

2 Answers 2


For emails it's not advised to use classes, since a lot of email clients don't understand these or they will just filter the CSS files. This makes sense, since they don't want you to alter the entire view of the layout of their webpage.

In newer Magento versions, you can indeed use the email-inline.css files, which will be automatically parsed into inline styles by Magento. Until your on the latest Magento version (which I highly recommend, because 1.5 is outdated and a lot of security leaks have been fixed the last couple of years), I'd advice you to convert all the styles you wanted to apply with classes into inline CSS.

A good way to test this is by making a local copy of your webshop and install MailHog or Mailcatcher on your local machine. Theses applications make it possible to send mails, but they'll be catched by the application, instead of being send to the actual recipient. Be aware that this will only work when you change the php.ini.


You can edit the email template by going through Admin panel. For that,

admin panel login -> system -> transactional email -> add new template -> choose template that you want to edit

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.