How to specify Devise 'from' email
-
26-09-2019 - |
Question
I want Devise to send emails from specified address, not from ActionMailer default. Is it posible?
Solution
config.mailer_sender
property in config/devise/devise.rb
allows you to specify that. If you don't have config/devise/devise.rb
, run devise:install
generator.
OTHER TIPS
In Rails 4, set config.mailer_sender
in config/initializers/devise.rb
like this:
config.mailer_sender = 'Some One <no-reply@example.com>'
In case the file is not present , you can create a file at 'config/initializers/devise.rb' and add -
Devise.setup do |config|
config.mailer_sender = SUPPORT_EMAIL
end
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow