diff options
author | David Padilla <david@easybroker.com> | 2016-03-01 08:29:20 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-03-25 15:05:15 +0300 |
commit | 31e76baf610e1307090a6bac3a7b3d525bce057a (patch) | |
tree | 6381eb0aa46cdfb646f93aaa1bfd7b8e5d881333 /app/mailers/notify.rb | |
parent | 63c8a05bf7f18ac4093ece1f08b4b5fd8dba5fac (diff) |
Fix #2364. Fall back to In-Reply-To header when reply key not available
Diffstat (limited to 'app/mailers/notify.rb')
-rw-r--r-- | app/mailers/notify.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb index 8cbc9eefc7b..e7331d88517 100644 --- a/app/mailers/notify.rb +++ b/app/mailers/notify.rb @@ -121,11 +121,17 @@ class Notify < BaseMailer # # See: mail_answer_thread def mail_new_thread(model, headers = {}) - headers['Message-ID'] = message_id(model) + headers['Message-ID'] = message_reply_id + headers['In-Reply-To'] = message_id(model) + headers['References'] = message_id(model) mail_thread(model, headers) end + def message_reply_id + Gitlab.config.incoming_email["address"].gsub("%{key}", reply_key) + end + # Send an email that responds to an existing conversation thread, # with headers suitable for grouping by thread in email clients. # |