Questions tagged [premailer]
43 questions
14
votes
2 answers
How do I specify a stylesheet for my HTML email with Premailer-Rails gem?
I have a stylesheet I want to use in my HTML emails at the path:
app/vendor/assets/stylesheets/inspinia/email_templates/email-styles.css
I am using the Premailer-Rails gem for my email styling.
In my mailer.html.erb layout, I have the…

marcamillion
- 32,933
- 55
- 189
- 380
10
votes
4 answers
How to Integrate 'premailer' with Rails
How does one integrate the 'premailer' gem with a Rails (3.0.7) project? I currently have in my mailer:
def welcome(user)
@user = user
mail to: user.email, subject: "Welcome"
end
But I can't figure out how to integrate the library. I need to…

Stussa
- 3,375
- 3
- 24
- 35
8
votes
2 answers
CSS Inliner in Javascript (premailer)
I use CKEDITOR 4 and I want to filter a HTML content to insert the style directly in the HTML Elements like MailChimp with its CSS inliner (http://beaker.mailchimp.com/inline-css). But I have to do in Javascript must, someone an idea?
I can use…

EpokK
- 38,062
- 9
- 61
- 69
7
votes
2 answers
How can I get PreMailer.Net to not change the encoding of non-ascii characters?
I've also posted my problem as a Github Issue on the official repo.
I am using PreMailer.Net to inline CSS into HTML documents. However, when I call MoveCssInline, it encodes non-ASCII characters like '&'. For example:

Captain Stack
- 3,572
- 5
- 31
- 56
4
votes
3 answers
How to move CSS inline with PreMailer.Net whilst using MvcMailer for sending HTML emails
Using MvcMailer, the problem is that our emails are being sent without our CSS as inline style attributes.
PreMailer.Net is a C# Library that can read in an HTML source string, and return a resultant HTML string with CSS in-lined.
How do we use them…

Zac
- 1,722
- 1
- 19
- 22
3
votes
1 answer
Premailer.Net error: Could not load type 'AngleSharp.Parser.Html.HtmlParser' from assembly AngleSharp 0.10.1
so I am using .NetFW 4.7.1 and I get the following error when Premailer.Net is being instantiated:
Could not load type AngleSharp.Parser.Html.HtmlParser.
I am using Premailer.Net v. 2.0.1 and AngleSharp v. 0.10.1.
Here is the chank of code that…

Lazar Cvijovic
- 95
- 10
3
votes
2 answers
How to use Materialize.css in an email?
I'm trying to create an email template in Django which uses Materialize.css. Here is the template code:

Kurt Peek
- 52,165
- 91
- 301
- 526
3
votes
1 answer
Node js: not found ruby.exe
iam new to node js, ruby grunt etc. And i want to use premailer for my e-mail templates. So i installed node js, ruby, grunt and premailer but when i try to grunt it i get this error message:
C:\Users\Noeel\Desktop\mail>grunt
Running…

noe m
- 167
- 6
3
votes
1 answer
Can I add an attribute to a filter in haml?
I'm using premailer-rails gem for a newsletter e-mail which is responsive. The gem is removing media queries that are within my .scss file by default. Premailer comes with an option that works only on style tags data_premailer => ignore, which…

Emil A.
- 3,387
- 4
- 29
- 46
3
votes
1 answer
Premailer with Jekyll
I'm working on a project that has both static web pages and also HTML Email templates.
As you probably know, HTML Emails require all CSS to be inlined which is a huge pain to manage. Most people use Premailer to handle this automatically -…

Alex Phelps
- 393
- 4
- 8
3
votes
1 answer
Integrate premailer gem with Rails 2.X application
I have a rails 2.3 application and would like to integrate the premailer gem to it.
I found how can you do it for a rails 3.X application:
How to Integrate 'premailer' with Rails
Anyone knows how to do it for action mailer 2.3.10?

iwiznia
- 1,669
- 14
- 21
3
votes
1 answer
How can I generate html and text emails from the same source?
I'm sending html emails using premailer. By default, it will generate a simple text rendering of the email based on the non-html content. It's an okay start, but has some annoyances such as literal rendering of all breaks.
Is there a way for me to…

John Bachir
- 22,495
- 29
- 154
- 227
2
votes
1 answer
AttributeError: 'CSSMediaRule' object has no attribute 'style' in premailer
I was trying to transform the following nested media query CSS with premailer.