I’m sending plain text and html emails by having multiple files for each
email I send. For example, for my registration email I have a
registration.text.plain.erb file and a registration.text.html.erb file.
I want to use a layout for the html version of my emails. In my mailer
class AccountsMailer < ActionMailer::Base
Unfortunately rails seems to look for views/layouts/email.html.erb and
uses that layout for both my HTML and plain text emails. When I name
the file email.text.html.erb rails complains:
Missing layout layouts/email.erb …
How do I set up action mailer so that it uses a layout only for the html
version of emails?