Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify Devise 'from' email

I want Devise to send emails from specified address, not from ActionMailer default. Is it posible?

like image 757
Anatoliy Kukul Avatar asked Nov 21 '10 00:11

Anatoliy Kukul


People also ask

Does devise work with rails 7?

Our out-of-the box Devise setup is now working with Rails 7. Once again, if you'd like to refer to any of the code for this setup, or use the template wholesale for a new app, the code is available on GitHub, and you may also use it as a template repo to kick off your own Rails 7 devise projects.


2 Answers

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.

like image 101
Chandra Patni Avatar answered Sep 28 '22 05:09

Chandra Patni


In Rails 4, set config.mailer_sender in config/initializers/devise.rb like this:

config.mailer_sender = 'Some One <[email protected]>'
like image 32
dheeraji Avatar answered Sep 28 '22 04:09

dheeraji