rails & custom devise controller > email templates

hello,

i have an app that operates under 2 domains, depending on the domain
the app serves 2 different application layouts. Now i want to show
different devise-email-layouts when sending these devise emails.
I have the custom devise controllers and i can trigger them from an
test action, but i don't know how to use them on devise actions.
thank you in advance
t

hello,

i have an app that operates under 2 domains, depending on the domain
the app serves 2 different application layouts. Now i want to show
different devise-email-layouts when sending these devise emails.
I have the custom devise controllers and i can trigger them from an
test action, but i don't know how to use them on devise actions.
thank you in advance
t

I would start here: https://guides.rubyonrails.org/layouts_and_rendering.html#the-layout-option

It's not specific to mailers, but the concept should apply.

Walter

This may help https://til.codes/rails-devise-send-different-emails-for-confirmation-based-on-the-presence-of-attribute-or-parameter/

You can also configure which email layout to use (would be similar to how you are setting the application layout to use).

# Or to configure mailer layout
  Devise::Mailer.layout "email"