diff options
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/mailers/devise_mailer.rb | 4 | ||||
-rw-r--r-- | config/initializers/devise.rb | 7 | ||||
-rw-r--r-- | spec/mailers/notify_spec.rb | 3 |
4 files changed, 7 insertions, 8 deletions
diff --git a/CHANGELOG b/CHANGELOG index 2364cf5d7fa..218c62e3b9c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 7.11.0 (unreleased) + - Make Reply-To config apply to change e-mail confirmation and other Devise notifications (Stan Hu) - Don't allow a merge request to be merged when its title starts with "WIP". - Get Gitorious importer to work again. - Fix clone URL field and X11 Primary selection (Dmitry Medvinsky) diff --git a/app/mailers/devise_mailer.rb b/app/mailers/devise_mailer.rb new file mode 100644 index 00000000000..5395fe16414 --- /dev/null +++ b/app/mailers/devise_mailer.rb @@ -0,0 +1,4 @@ +class DeviseMailer < Devise::Mailer + default from: "GitLab <#{Gitlab.config.gitlab.email_from}>" + default reply_to: Gitlab.config.gitlab.email_reply_to +end diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 9dce495106f..8f8c4169740 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -2,13 +2,8 @@ # four configuration values can also be set straight in your models. Devise.setup do |config| # ==> Mailer Configuration - # Configure the e-mail address which will be shown in Devise::Mailer, - # note that it will be overwritten if you use your own mailer class with default "from" parameter. - config.mailer_sender = "GitLab <#{Gitlab.config.gitlab.email_from}>" - - # Configure the class responsible to send e-mails. - # config.mailer = "Devise::Mailer" + config.mailer = "DeviseMailer" # ==> ORM configuration # Load and configure the ORM. Supports :active_record (default) and diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index d28b4768545..dbcf7286e45 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -11,9 +11,8 @@ describe Notify do let(:recipient) { create(:user, email: 'recipient@example.com') } let(:project) { create(:project) } - around(:each) { ActionMailer::Base.deliveries.clear } - before(:each) do + ActionMailer::Base.deliveries.clear email = recipient.emails.create(email: "notifications@example.com") recipient.update_attribute(:notification_email, email.email) end |