4
5 Comments

Premailer or Bootstrap-email?

Colleagues, I built a saas product on Rubi on Rails 5.2 and boostrap 4.5 for (parts of the) styling.
I am wandering what would be your recommendation for styling emails?
I was previously using premailer but i recently came across Bootstrap-email.
Any reasons why to prefer one over the other? Post/cons?
Thanks!

  1. 1

    Update to my own question:

    I decided at the end to ditch premailer and use only boostrap-email.
    The later handles the responsive layout of the emails better.
    The only quirk I found was in integrating it with Devise gem as I needed to override one of the protected methods in the later so it will use, instead of the mail method the make_boostrap_mail one instead.

    Nat

  2. 1

    Any reason you can't use an external email service and deliver via API? A lot of these tools offer generous free teirs, and easy to use templates.

    I've integrated SendGrids API into a Rails app fairly quickly.

    1. 1

      I am using, indeed, one (Mailgun in my case). But I need to be able to properly style my emails following the design guidelines of the app, and for that I need the styles to be inlined. I can see two main gems for this: premailer and bootstrap-email.
      So I was wondering if people have experience with both and which they prefer and why....

      1. 1

        For sure, I totally understand that you want your emails to match your app's styles. I think though that you would still be able to do that with an external tool. Of course you can't reuse any variables or styles from your app's CSS in your email styles directly, but honestly, can you do that anyways?

        1. 1

          Yes, you can (to a large degree) with either of those gems (still requires tweeking though). The external templates are good for simple cases but if your app sends lots of different kinds of notifications, files, data, etc via emails then it becomes really troublesome to manage those external templates. From within the app you can more readily (a) reuse. and (b) version control.

Trending on Indie Hackers
How I grew a side project to 100k Unique Visitors in 7 days with 0 audience 47 comments Competing with Product Hunt: a month later 33 comments Why do you hate marketing? 27 comments $15k revenues in <4 months as a solopreneur 14 comments Use Your Product 13 comments How I Launched FrontendEase 13 comments