markets / maily

📫 Rails Engine to preview emails in the browser
https://rubygems.org/gems/maily
MIT License
707 stars 31 forks source link

Email content rendered always as text #32

Closed pcriv closed 5 years ago

pcriv commented 5 years ago

Suddenly emails content is only rendered as text. Any idea why this could be?

maily - account mailer email changed 2018-12-19 07-34-05

Also, is there anyway to update the emails without having to restart the rails server?

TIA!

markets commented 5 years ago

hi @pablocrivella

Suddenly emails content is only rendered as text

Weird, I didn't release anything relevant that could cause this bug. In fact, last release https://github.com/markets/maily/compare/v0.8.0...v0.8.1 only changed fonts to Google Fonts API...

It should be caused, 99% sure, by some gem update (which Maily depends on), maybe mail (internal Rails dep)? Did you know if that's your case?

I'll try to reproduce it locally btw.

is there anyway to update the emails without having to restart the rails server?

Nope, basically because how Maily is actually designed :point_right: https://github.com/markets/maily#templates-edition-allow_edition-option


Thanks for your feedback @pablocrivella! As I said before, I'll try to dig on that issue asap, meanwhile if you can provide me more info, it would be very useful.

markets commented 5 years ago

@pablocrivella I think I've found the cause: mail gem updated from 2.7.0 to 2.7.1 (released last month), returning back to previous version fixed it for me:

gem 'mail', '2.7.0'

You can use this workaround for now, but of course, I'll try to find a fix :)

This is what I noticed it changed between these 2 versions:

https://github.com/markets/maily/blob/272693b5c6e62832fbb87ef8693191ffba936a78/app/controllers/maily/emails_controller.rb#L26

markets commented 5 years ago

@pablocrivella I just pushed a fix here #33 :stuck_out_tongue: could you please give it a try?

markets commented 5 years ago

@pablocrivella v0.8.2 released https://rubygems.org/gems/maily/versions/0.8.2 🚀