diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-08-18 17:02:26 -0700 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-08-18 17:02:26 -0700 |
commit | 8906cabae7a6be44cafcedcaf27352614fcc462b (patch) | |
tree | 6ff7220890a5d8e22d16af0daa9689eddd0d4767 /app/mailers | |
parent | a428838dc00dd95f5dad0e433ad2eb73df2eff0f (diff) | |
download | gitlab-ce-8906cabae7a6be44cafcedcaf27352614fcc462b.tar.gz |
Changes and stuff.
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/notify.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb index 44df3d6407d..c2ea99d9688 100644 --- a/app/mailers/notify.rb +++ b/app/mailers/notify.rb @@ -146,7 +146,7 @@ class Notify < ActionMailer::Base if reply_key headers['X-GitLab-Reply-Key'] = reply_key - headers['Reply-To'] = Gitlab.config.reply_by_email.address.gsub('%{reply_key}', reply_key) + headers['Reply-To'] = Gitlab::ReplyByEmail.reply_address(reply_key) end mail(headers) @@ -165,6 +165,10 @@ class Notify < ActionMailer::Base headers['In-Reply-To'] = message_id(model) headers['References'] = message_id(model) + if headers[:subject] + headers[:subject].prepend('Re: ') + end + mail_new_thread(model, headers) end @@ -173,8 +177,6 @@ class Notify < ActionMailer::Base end def reply_key - return nil unless Gitlab.config.reply_by_email.enabled - - @reply_key ||= SecureRandom.hex(16) + @reply_key ||= Gitlab::ReplyByEmail.reply_key end end |