Q: How to change the reply_to option in devise I am using rails 4.
In my config/initializers/devise.rb file I set the
config.mailer_sender = 'noreply@test.com'
Which is setting for from and reply_to address at the email.
But I want to use different email address for from and reply_to.
How can I do that.
Thanks in Advance.

A: Devise doesn't let you configure this without defining your own Mailer at the moment. But my quick and dirty way is adding this to the initializer:
ActiveSupport.on_load(:action_mailer) {
  Devise::Mailer.default reply_to: 'foo@bar.dev'
}


A: I managed to achieve this by setting the mailer_sender in Devise to the email I wanted users to reply to (in config/initializers/devise.rb):
Devise.setup do |config|
  config.mailer_sender = "reply-to@example.com"
end

And setting the base ActionMailer default from as the address I wanted emails to be sent from (in config/environment.rb):
ActionMailer::Base.default :from => "Name <from-email@example.com>"

Remember to restart your server before testing!
Version info:


*

*Devise: 4.2.0 

*Rails: 4.2.0


A: This did the trick for me:
  Devise.setup do |config|
    Devise::Mailer.default reply_to: 'no-reply@xyz.com'
    Devise::Mailer.default from: 'registrations@xyz.com'
  ...

