Closed anatoliyarkhipov closed 2 years ago
@anatoliyarkhipov Sorry for the long delay in replying.
What did your mail
look like? I think if you were requesting format.mjml
then the file would need to be .mjml
, but if you request format.html
then the file can be called .html.mjml
.
So perhaps this PR should change format.mjml
to format.html
?
# ./app/mailers/user_mailer.rb
class UserMailer < ActionMailer::Base
def user_signup_confirmation
mail(to: "user@example.com", from: "app@example.com") do |format|
format.text
format.html
end
end
end
Hellooow. You're right.
This is my mailer:
class PonyMailer < ApplicationMailer
def doggo_report(hooman)
subject = "A report from Doggo"
mail to: hooman.email, subject: subject do |format|
format.mjml
end
end
end
But also, it's suggested to use .mjml
in the README:
@anatoliyarkhipov I went with your suggestion and updated the partial code in the example. Thanks for your PR.
Thank you @sighmon, for making the library, it's a beautiful piece of software.
It's not so about the name itself (which isn't hard to guess is incorrect), as about the
.html.mjml
extension - I realized that.html
should be removed only after reading the post linked below in the README. Until then I was receiving