Merge pull request #739 from albertsun/devise-email-from

Have devise send mail from the ENV['EMAIL_FROM_ADDRESS'] address

Andrew Cantino 9 years ago
parent
commit
45eade1825
1 changed files with 1 additions and 1 deletions
  1. 1 1
      config/initializers/devise.rb

+ 1 - 1
config/initializers/devise.rb

@@ -5,7 +5,7 @@ Devise.setup do |config|
5 5
   # Configure the e-mail address which will be shown in Devise::Mailer,
6 6
   # note that it will be overwritten if you use your own mailer class
7 7
   # with default "from" parameter.
8
-  config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
8
+  config.mailer_sender = ENV['EMAIL_FROM_ADDRESS'].presence || 'you@example.com'
9 9
 
10 10
   # Configure the class responsible to send e-mails.
11 11
   # config.mailer = 'Devise::Mailer'