1

I watched a few online tutorials and set up inky and premailer to give styling to emails in an organised way, and am very happy with this set up.

premailer gem should automatically generate the text.erb email based on the html.erb email. According to here that should still work when using inky, but when I visit my mailer in the browser and select the 'View as plain-text email' option, I see the regular booking_confirmation.text.erb file with whatever I put in it manually, rather than the booking_confirm.inky file's body.

How can I get premailer to generate the plain text email based on the .inky file?

Notes:

stevec
  • 41,291
  • 27
  • 223
  • 311

1 Answers1

0

After randomly playing about with different extensions and other things, I realised it's simple: premailer/inky will only generate the plain text equivalent of the HTML file if a file of that name with extension .text.erb doesn't already exist.

In other words, to get a auto generated version of booking_confirmation.inky, you simply need to delete booking_confirmation.text.erb, then it will auto generate.

stevec
  • 41,291
  • 27
  • 223
  • 311